Class CinemachineFollowZoom | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class CinemachineFollowZoom

    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
    MonoBehaviour
    CinemachineExtension
    CinemachineFollowZoom
    Inherited Members
    CinemachineExtension.Epsilon
    CinemachineExtension.VirtualCamera
    CinemachineExtension.Awake()
    CinemachineExtension.OnDestroy()
    CinemachineExtension.ConnectToVcam(Boolean)
    CinemachineExtension.InvokePostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, CameraState, Single)
    CinemachineExtension.OnTargetObjectWarped(Transform, Vector3)
    CinemachineExtension.GetExtraState<T>(ICinemachineCamera)
    CinemachineExtension.GetAllExtraStates<T>()
    Namespace: Cinemachine
    Syntax
    [DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
    public class CinemachineFollowZoom : CinemachineExtension

    Fields

    m_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.

    Declaration
    public float m_Damping
    Field Value
    Type Description
    System.Single

    m_MaxFOV

    Will not generate an FOV larget than this.

    Declaration
    public float m_MaxFOV
    Field Value
    Type Description
    System.Single

    m_MinFOV

    Will not generate an FOV smaller than this.

    Declaration
    public float m_MinFOV
    Field Value
    Type Description
    System.Single

    m_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.

    Declaration
    public float m_Width
    Field Value
    Type Description
    System.Single

    Methods

    PostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, ref CameraState, Single)

    Callback to preform the zoom adjustment

    Declaration
    protected override void PostPipelineStageCallback(CinemachineVirtualCameraBase vcam, CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam
    CinemachineCore.Stage stage
    CameraState state
    System.Single deltaTime
    Overrides
    CinemachineExtension.PostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, ref CameraState, Single)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023