CinemachineFollowZoom Class

Cinemachine

CinemachineFollowZoom Class

An add-on module for Cinemachine Virtual Camera that adjusts the FOV of the lens to keep the target object at a constant size on the screen, regardless of camera and target position.
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          CinemachineCinemachineExtension
            CinemachineCinemachineFollowZoom

Namespace:  Cinemachine
Assembly:  Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
[DocumentationSortingAttribute(16f, DocumentationSortingAttributeLevel.UserRef)]
[ExecuteInEditMode]
[AddComponentMenu("")]
[SaveDuringPlayAttribute]
public class CinemachineFollowZoom : CinemachineExtension
Cinemachine.CinemachineFollowZoom = function();

Type.createClass(
	'Cinemachine.CinemachineFollowZoom',
	Cinemachine.CinemachineExtension);

The CinemachineFollowZoom type exposes the following members.

Constructors
  NameDescription
Public methodCinemachineFollowZoom
Top
Properties
  NameDescription
Public propertyVirtualCamera
Get the associated CinemachineVirtualCameraBase
(Inherited from CinemachineExtension.)
Top
Methods
  NameDescription
Protected methodAwake
Connect to virtual camera pipeline. Override implementations must call this base implementation
(Inherited from CinemachineExtension.)
Protected methodGetAllExtraStatesT
Ineffeicient method to get all extra state infor for all vcams. Intended for Editor use only, not runtime!
(Inherited from CinemachineExtension.)
Protected methodGetExtraStateT
Because extensions can be placed on manager cams and will in that case be called for all the vcam children, vcam-specific state information should be stored here. Just define a class to hold your state info and use it exclusively when calling this.
(Inherited from CinemachineExtension.)
Protected methodOnDestroy
Disconnect from virtual camera pipeline. Override implementations must call this base implementation
(Inherited from CinemachineExtension.)
Protected methodPostPipelineStageCallback
Callback to preform the zoom adjustment
(Overrides CinemachineExtensionPostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCoreStage, CameraState, Single).)
Top
Fields
  NameDescription
Public fieldm_Damping
Increase this value to soften the aggressiveness of the follow-zoom. Small numbers are more responsive, larger numbers give a more heavy slowly responding camera.
Public fieldm_MaxFOV
Will not generate an FOV larget than this.
Public fieldm_MinFOV
Will not generate an FOV smaller than this.
Public fieldm_Width
The shot width to maintain, in world units, at target distance. FOV will be adusted as far as possible to maintain this width at the target distance from the camera.
Top
See Also