docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CinemachineFreeLookModifier.Modifier

    Interface for an object that will modify some aspect of a FreeLook camera based on the vertical axis value.

    Inheritance
    object
    CinemachineFreeLookModifier.Modifier
    CinemachineFreeLookModifier.ComponentModifier<T>
    CinemachineFreeLookModifier.LensModifier
    CinemachineFreeLookModifier.TiltModifier
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    [Serializable]
    public abstract class CinemachineFreeLookModifier.Modifier

    Properties

    CachedComponentType

    Type of the cached component (null if no cached component). If this modifier targets specific components, this value indicates the type of that component. The modifier should cache the component, for performance.

    Declaration
    public virtual Type CachedComponentType { get; }
    Property Value
    Type Description
    Type

    HasRequiredComponent

    Return true if cached vcam component is present or not required

    Declaration
    public virtual bool HasRequiredComponent { get; }
    Property Value
    Type Description
    bool

    Methods

    AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, float, float)

    Called from extension's PostPipelineStageCallback(Finalize). Perform any necessary actions to state, and restore any camera parameters changed in BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, float, float).

    Declaration
    public virtual void AfterPipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    vcam owner

    CameraState state

    current vcam state. May be modified in this function

    float deltaTime

    current applicable deltaTime

    float modifierValue

    The normalized value of the modifier variable.
    This is the FreeLook's vertical axis. Ranges from -1 to 1, where 0 is center rig.

    BeforePipeline(CinemachineVirtualCameraBase, ref CameraState, float, float)

    Called from extension's PrePipelineMutateCameraState(). Perform any necessary actions to modify relevant camera settings. Original camera settings should be restored in AfterPipeline(CinemachineVirtualCameraBase, ref CameraState, float, float).

    Declaration
    public virtual void BeforePipeline(CinemachineVirtualCameraBase vcam, ref CameraState state, float deltaTime, float modifierValue)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    vcam owner

    CameraState state

    current vcam state. May be modified in this function

    float deltaTime

    current applicable deltaTime

    float modifierValue

    The normalized value of the modifier variable.
    This is the FreeLook's vertical axis. Ranges from -1 to 1, where 0 is center rig.

    RefreshCache(CinemachineVirtualCameraBase)

    Called from OnEnable and from the inspector. Refresh any performance-sensitive stuff.

    Declaration
    public virtual void RefreshCache(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    Reset(CinemachineVirtualCameraBase)

    Called when the modifier is created. Initialize fields with appropriate values.

    Declaration
    public virtual void Reset(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    Validate(CinemachineVirtualCameraBase)

    Called from OnValidate in the editor. Validate and sanitize the fields.

    Declaration
    public virtual void Validate(CinemachineVirtualCameraBase vcam)
    Parameters
    Type Name Description
    CinemachineVirtualCameraBase vcam

    the virtual camera owner

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)