docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CinemachineFreeLook

    This is a deprecated component. Use CinemachineCamera instead.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    CinemachineVirtualCameraBase
    CinemachineFreeLook
    Implements
    AxisState.IRequiresInput
    ICinemachineMixer
    ICinemachineCamera
    Inherited Members
    CinemachineVirtualCameraBase.Priority
    CinemachineVirtualCameraBase.OutputChannel
    CinemachineVirtualCameraBase.FollowTargetAttachment
    CinemachineVirtualCameraBase.LookAtTargetAttachment
    CinemachineVirtualCameraBase.StandbyUpdate
    CinemachineVirtualCameraBase.GetMaxDampTime()
    CinemachineVirtualCameraBase.DetachedFollowTargetDamp(float, float, float)
    CinemachineVirtualCameraBase.DetachedFollowTargetDamp(Vector3, Vector3, float)
    CinemachineVirtualCameraBase.DetachedFollowTargetDamp(Vector3, float, float)
    CinemachineVirtualCameraBase.DetachedLookAtTargetDamp(float, float, float)
    CinemachineVirtualCameraBase.DetachedLookAtTargetDamp(Vector3, Vector3, float)
    CinemachineVirtualCameraBase.DetachedLookAtTargetDamp(Vector3, float, float)
    CinemachineVirtualCameraBase.InvokePostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, ref CameraState, float)
    CinemachineVirtualCameraBase.InvokePrePipelineMutateCameraStateCallback(CinemachineVirtualCameraBase, ref CameraState, float)
    CinemachineVirtualCameraBase.InvokeOnTransitionInExtensions(ICinemachineCamera, Vector3, float)
    CinemachineVirtualCameraBase.Name
    CinemachineVirtualCameraBase.Description
    CinemachineVirtualCameraBase.IsValid
    CinemachineVirtualCameraBase.ParentCamera
    CinemachineVirtualCameraBase.UpdateCameraState(Vector3, float)
    CinemachineVirtualCameraBase.OnCameraActivated(ICinemachineCamera.ActivationEventParams)
    CinemachineVirtualCameraBase.OnTransformParentChanged()
    CinemachineVirtualCameraBase.Start()
    CinemachineVirtualCameraBase.OnDisable()
    CinemachineVirtualCameraBase.Update()
    CinemachineVirtualCameraBase.ResolveLookAt(Transform)
    CinemachineVirtualCameraBase.ResolveFollow(Transform)
    CinemachineVirtualCameraBase.MoveToTopOfPrioritySubqueue()
    CinemachineVirtualCameraBase.Prioritize()
    CinemachineVirtualCameraBase.PullStateFromVirtualCamera(Vector3, ref LensSettings)
    CinemachineVirtualCameraBase.FollowTargetChanged
    CinemachineVirtualCameraBase.LookAtTargetChanged
    CinemachineVirtualCameraBase.UpdateTargetCache()
    CinemachineVirtualCameraBase.FollowTargetAsGroup
    CinemachineVirtualCameraBase.FollowTargetAsVcam
    CinemachineVirtualCameraBase.LookAtTargetAsGroup
    CinemachineVirtualCameraBase.LookAtTargetAsVcam
    CinemachineVirtualCameraBase.GetCinemachineComponent(CinemachineCore.Stage)
    CinemachineVirtualCameraBase.IsLive
    CinemachineVirtualCameraBase.IsParticipatingInBlend()
    CinemachineVirtualCameraBase.CancelDamping(bool)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    [Obsolete("This is deprecated. Use Create -> Cinemachine -> FreeLook camera, or create a CinemachineCamera with appropriate components")]
    [DisallowMultipleComponent]
    [ExecuteAlways]
    [ExcludeFromPreset]
    [AddComponentMenu("")]
    public class CinemachineFreeLook : CinemachineVirtualCameraBase, AxisState.IRequiresInput, ICinemachineMixer, ICinemachineCamera

    Fields

    BlendHint

    Hint for transitioning to and from this CinemachineCamera. Hints can be combined, although not all combinations make sense. In the case of conflicting hints, Cinemachine will make an arbitrary choice.

    Declaration
    [Tooltip("Hint for transitioning to and from this CinemachineCamera.  Hints can be combined, although not all combinations make sense.  In the case of conflicting hints, Cinemachine will make an arbitrary choice.")]
    public CinemachineCore.BlendHints BlendHint
    Field Value
    Type Description
    CinemachineCore.BlendHints

    CreateRigOverride

    Override component pipeline creation. This needs to be done by the editor to support Undo. The override must do exactly the same thing as the CreatePipeline method in this class.

    Declaration
    public static CinemachineFreeLook.CreateRigDelegate CreateRigOverride
    Field Value
    Type Description
    CinemachineFreeLook.CreateRigDelegate

    DestroyRigOverride

    Override component pipeline destruction. This needs to be done by the editor to support Undo.

    Declaration
    public static CinemachineFreeLook.DestroyRigDelegate DestroyRigOverride
    Field Value
    Type Description
    CinemachineFreeLook.DestroyRigDelegate

    m_BindingMode

    The coordinate space to use when interpreting the offset from the target

    Declaration
    [Header("Orbits")]
    [Tooltip("The coordinate space to use when interpreting the offset from the target.  This is also used to set the camera's Up vector, which will be maintained when aiming the camera.")]
    public BindingMode m_BindingMode
    Field Value
    Type Description
    BindingMode

    m_CommonLens

    If enabled, this lens setting will apply to all three child rigs, otherwise the child rig lens settings will be used

    Declaration
    [Tooltip("If enabled, this lens setting will apply to all three child rigs, otherwise the child rig lens settings will be used")]
    [FormerlySerializedAs("m_UseCommonLensSetting")]
    public bool m_CommonLens
    Field Value
    Type Description
    bool

    m_Follow

    Object for the camera children wants to move with (the body target)

    Declaration
    [Tooltip("Object for the camera children wants to move with (the body target).")]
    public Transform m_Follow
    Field Value
    Type Description
    Transform

    m_Heading

    The definition of Forward. Camera will follow behind

    Declaration
    [Tooltip("The definition of Forward.  Camera will follow behind.")]
    public CinemachineOrbitalTransposer.Heading m_Heading
    Field Value
    Type Description
    CinemachineOrbitalTransposer.Heading

    m_Lens

    Specifies the lens properties of this Virtual Camera. This generally mirrors the Unity Camera's lens settings, and will be used to drive the Unity camera when the vcam is active

    Declaration
    [Tooltip("Specifies the lens properties of this Virtual Camera.  This generally mirrors the Unity Camera's lens settings, and will be used to drive the Unity camera when the vcam is active")]
    [FormerlySerializedAs("m_LensAttributes")]
    public LegacyLensSettings m_Lens
    Field Value
    Type Description
    LegacyLensSettings

    m_LookAt

    Object for the camera children to look at (the aim target)

    Declaration
    [Tooltip("Object for the camera children to look at (the aim target).")]
    public Transform m_LookAt
    Field Value
    Type Description
    Transform

    m_OnCameraLiveEvent

    This event fires when a transition occurs.

    Declaration
    [Tooltip("This event fires when a transition occurs")]
    public CinemachineLegacyCameraEvents.OnCameraLiveEvent m_OnCameraLiveEvent
    Field Value
    Type Description
    CinemachineLegacyCameraEvents.OnCameraLiveEvent

    m_Orbits

    The radius and height of the three orbiting rigs

    Declaration
    [Tooltip("The radius and height of the three orbiting rigs.")]
    public CinemachineFreeLook.Orbit[] m_Orbits
    Field Value
    Type Description
    Orbit[]

    m_RecenterToTargetHeading

    Controls how automatic recentering of the X axis is accomplished

    Declaration
    [Tooltip("Controls how automatic recentering of the X axis is accomplished")]
    public AxisState.Recentering m_RecenterToTargetHeading
    Field Value
    Type Description
    AxisState.Recentering

    m_SplineCurvature

    Declaration
    [Tooltip("Controls how taut is the line that connects the rigs' orbits, which determines final placement on the Y axis")]
    [Range(0, 1)]
    [FormerlySerializedAs("m_SplineTension")]
    public float m_SplineCurvature
    Field Value
    Type Description
    float

    m_XAxis

    The Horizontal axis. Value is -180...180. This is passed on to the rigs' OrbitalTransposer component

    Declaration
    [Tooltip("The Horizontal axis.  Value is -180...180.  This is passed on to the rigs' OrbitalTransposer component")]
    public AxisState m_XAxis
    Field Value
    Type Description
    AxisState

    m_YAxis

    The Vertical axis. Value is 0..1. Chooses how to blend the child rigs

    Declaration
    [Header("Axis Control")]
    [Tooltip("The Vertical axis.  Value is 0..1.  Chooses how to blend the child rigs")]
    public AxisState m_YAxis
    Field Value
    Type Description
    AxisState

    m_YAxisRecentering

    Controls how automatic recentering of the Y axis is accomplished

    Declaration
    [Tooltip("Controls how automatic recentering of the Y axis is accomplished")]
    public AxisState.Recentering m_YAxisRecentering
    Field Value
    Type Description
    AxisState.Recentering

    Properties

    Follow

    Get the current Follow target. Returns parent's Follow if parent is non-null and no specific Follow defined for this camera

    Declaration
    public override Transform Follow { get; set; }
    Property Value
    Type Description
    Transform
    Overrides
    CinemachineVirtualCameraBase.Follow

    IsDprecated

    Helper for upgrading from CM2

    Declaration
    protected override bool IsDprecated { get; }
    Property Value
    Type Description
    bool
    Overrides
    CinemachineVirtualCameraBase.IsDprecated

    LookAt

    Get the current LookAt target. Returns parent's LookAt if parent is non-null and no specific LookAt defined for this camera

    Declaration
    public override Transform LookAt { get; set; }
    Property Value
    Type Description
    Transform
    Overrides
    CinemachineVirtualCameraBase.LookAt

    PreviousStateIsValid

    Set this to force the next update to ignore deltaTime and reset itself

    Declaration
    public override bool PreviousStateIsValid { get; set; }
    Property Value
    Type Description
    bool
    Overrides
    CinemachineVirtualCameraBase.PreviousStateIsValid

    RigNames

    Names of the 3 child rigs

    Declaration
    public static string[] RigNames { get; }
    Property Value
    Type Description
    string[]

    State

    The cacmera state, which will be a blend of the child rig states

    Declaration
    public override CameraState State { get; }
    Property Value
    Type Description
    CameraState
    Overrides
    CinemachineVirtualCameraBase.State

    Methods

    ForceCameraPosition(Vector3, Quaternion)

    Force the virtual camera to assume a given position and orientation.
    Procedural placement then takes over

    Declaration
    public override void ForceCameraPosition(Vector3 pos, Quaternion rot)
    Parameters
    Type Name Description
    Vector3 pos

    Worldspace position to take

    Quaternion rot

    Worldspace orientation to take

    Overrides
    CinemachineVirtualCameraBase.ForceCameraPosition(Vector3, Quaternion)

    GetLocalPositionForCameraFromInput(float)

    Returns the local position of the camera along the spline used to connect the three camera rigs. Does not take into account the current heading of the camera (or its target)

    Declaration
    public Vector3 GetLocalPositionForCameraFromInput(float t)
    Parameters
    Type Name Description
    float t

    The t-value for the camera on its spline. Internally clamped to the value [0,1]

    Returns
    Type Description
    Vector3

    The local offset (back + up) of the camera WRT its target based on the supplied t-value

    GetRig(int)

    Get a child rig

    Declaration
    public CinemachineVirtualCamera GetRig(int i)
    Parameters
    Type Name Description
    int i

    Rig index. Can be 0, 1, or 2

    Returns
    Type Description
    CinemachineVirtualCamera

    The rig, or null if index is bad.

    InternalUpdateCameraState(Vector3, float)

    Internal use only. Called by CinemachineCore at designated update time so the vcam can position itself and track its targets. All 3 child rigs are updated, and a blend calculated, depending on the value of the Y axis.

    Declaration
    public override void InternalUpdateCameraState(Vector3 worldUp, float deltaTime)
    Parameters
    Type Name Description
    Vector3 worldUp

    Default world Up, set by the CinemachineBrain

    float deltaTime

    Delta time for time-based effects (ignore if less than 0)

    Overrides
    CinemachineVirtualCameraBase.InternalUpdateCameraState(Vector3, float)

    IsLiveChild(ICinemachineCamera, bool)

    Check whether the vcam a live child of this camera. Returns true if the child is currently contributing actively to the camera state.

    Declaration
    public bool IsLiveChild(ICinemachineCamera vcam, bool dominantChildOnly = false)
    Parameters
    Type Name Description
    ICinemachineCamera vcam

    The Virtual Camera to check

    bool dominantChildOnly

    If truw, will only return true if this vcam is the dominant live child

    Returns
    Type Description
    bool

    True if the vcam is currently actively influencing the state of this vcam

    OnDestroy()

    Makes sure that the child rigs get destroyed in an undo-firndly manner. Invalidates the rig cache.

    Declaration
    protected override void OnDestroy()
    Overrides
    CinemachineVirtualCameraBase.OnDestroy()

    OnEnable()

    Updates the child rig cache

    Declaration
    protected override void OnEnable()
    Overrides
    CinemachineVirtualCameraBase.OnEnable()

    OnTargetObjectWarped(Transform, Vector3)

    This is called to notify the vcam that a target got warped, so that the vcam can update its internal state to make the camera also warp seamlessly.

    Declaration
    public override void OnTargetObjectWarped(Transform target, Vector3 positionDelta)
    Parameters
    Type Name Description
    Transform target

    The object that was warped

    Vector3 positionDelta

    The amount the target's position changed

    Overrides
    CinemachineVirtualCameraBase.OnTargetObjectWarped(Transform, Vector3)

    OnTransitionFromCamera(ICinemachineCamera, Vector3, float)

    If we are transitioning from another FreeLook, grab the axis values from it.

    Declaration
    public override void OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime)
    Parameters
    Type Name Description
    ICinemachineCamera fromCam

    The camera being deactivated. May be null.

    Vector3 worldUp

    Default world Up, set by the CinemachineBrain

    float deltaTime

    Delta time for time-based effects (ignore if less than or equal to 0)

    Overrides
    CinemachineVirtualCameraBase.OnTransitionFromCamera(ICinemachineCamera, Vector3, float)

    PerformLegacyUpgrade(int)

    Override this to handle any upgrades necessitated by a streaming version change. Note that since this method is not called from the main thread, there are many things it cannot do, including checking a unity object for null.

    Declaration
    protected override void PerformLegacyUpgrade(int streamedVersion)
    Parameters
    Type Name Description
    int streamedVersion

    The version that was streamed

    Overrides
    CinemachineVirtualCameraBase.PerformLegacyUpgrade(int)

    Implements

    AxisState.IRequiresInput
    ICinemachineMixer
    ICinemachineCamera

    Extension Methods

    CinemachineInputProviderExtensions.GetInputAxisProvider(CinemachineVirtualCameraBase)
    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)