docs.unity3d.com
    Show / Hide Table of Contents

    Class Cinemachine3rdPersonFollow

    Third-person follower, with complex pivoting: horizontal about the origin, vertical about the shoulder.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    CinemachineComponentBase
    Cinemachine3rdPersonFollow
    Inherited Members
    CinemachineComponentBase.Epsilon
    CinemachineComponentBase.VirtualCamera
    CinemachineComponentBase.FollowTarget
    CinemachineComponentBase.LookAtTarget
    CinemachineComponentBase.AbstractFollowTargetGroup
    CinemachineComponentBase.FollowTargetGroup
    CinemachineComponentBase.FollowTargetPosition
    CinemachineComponentBase.FollowTargetRotation
    CinemachineComponentBase.AbstractLookAtTargetGroup
    CinemachineComponentBase.LookAtTargetGroup
    CinemachineComponentBase.LookAtTargetPosition
    CinemachineComponentBase.LookAtTargetRotation
    CinemachineComponentBase.VcamState
    CinemachineComponentBase.PrePipelineMutateCameraState(CameraState, Single)
    CinemachineComponentBase.BodyAppliesAfterAim
    CinemachineComponentBase.OnTransitionFromCamera(ICinemachineCamera, Vector3, Single, CinemachineVirtualCameraBase.TransitionParams)
    CinemachineComponentBase.ForceCameraPosition(Vector3, Quaternion)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    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.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    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
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Cinemachine
    Syntax
    [AddComponentMenu("")]
    public class Cinemachine3rdPersonFollow : CinemachineComponentBase

    Fields

    CameraCollisionFilter

    Camera will avoid obstacles on these layers.

    Declaration
    [Header("Obstacles")]
    [Tooltip("Camera will avoid obstacles on these layers")]
    public LayerMask CameraCollisionFilter
    Field Value
    Type Description
    LayerMask

    CameraDistance

    How far baehind the hand the camera will be placed.

    Declaration
    [Tooltip("How far baehind the hand the camera will be placed")]
    public float CameraDistance
    Field Value
    Type Description
    Single

    CameraRadius

    Specifies how close the camera can get to obstacles

    Declaration
    [Tooltip("Specifies how close the camera can get to obstacles")]
    [Range(0F, 1F)]
    public float CameraRadius
    Field Value
    Type Description
    Single

    CameraSide

    Specifies which shoulder (left, right, or in-between) the camera is on.

    Declaration
    [Tooltip("Specifies which shoulder (left, right, or in-between) the camera is on")]
    [Range(0F, 1F)]
    public float CameraSide
    Field Value
    Type Description
    Single

    Damping

    How responsively the camera tracks the target. Each axis (camera-local) can have its own setting. Value is the approximate time it takes the camera to catch up to the target's new position. Smaller values give a more rigid effect, larger values give a squishier one.

    Declaration
    [Tooltip("How responsively the camera tracks the target.  Each axis (camera-local) can have its own setting.  Value is the approximate time it takes the camera to catch up to the target's new position.  Smaller values give a more rigid effect, larger values give a squishier one")]
    public Vector3 Damping
    Field Value
    Type Description
    Vector3

    IgnoreTag

    Obstacles with this tag will be ignored. It is a good idea to set this field to the target's tag

    Declaration
    [Tooltip("Obstacles with this tag will be ignored.  It is a good idea to set this field to the target's tag")]
    public string IgnoreTag
    Field Value
    Type Description
    String

    ShoulderOffset

    Position of the shoulder pivot relative to the Follow target origin.
    This offset is in target-local space.

    Declaration
    [Header("Rig")]
    [Tooltip("Position of the shoulder pivot relative to the Follow target origin.  This offset is in target-local space")]
    public Vector3 ShoulderOffset
    Field Value
    Type Description
    Vector3

    VerticalArmLength

    Vertical offset of the hand in relation to the shoulder.
    Arm length will affect the follow target's screen position when the camera rotates vertically.

    Declaration
    [Tooltip("Vertical offset of the hand in relation to the shoulder.  Arm length will affect the follow target's screen position when the camera rotates vertically")]
    public float VerticalArmLength
    Field Value
    Type Description
    Single

    Properties

    IsValid

    True if component is enabled and has a Follow target defined

    Declaration
    public override bool IsValid { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    CinemachineComponentBase.IsValid

    Stage

    Get the Cinemachine Pipeline stage that this component implements. Always returns the Aim stage

    Declaration
    public override CinemachineCore.Stage Stage { get; }
    Property Value
    Type Description
    CinemachineCore.Stage
    Overrides
    CinemachineComponentBase.Stage

    Methods

    GetMaxDampTime()

    Report maximum damping time needed for this component.

    Declaration
    public override float GetMaxDampTime()
    Returns
    Type Description
    Single

    Highest damping setting in this component

    Overrides
    CinemachineComponentBase.GetMaxDampTime()

    GetRigPositions(out Vector3, out Vector3, out Vector3)

    Internal use only. Public for the inspector gizmo

    Declaration
    public void GetRigPositions(out Vector3 root, out Vector3 shoulder, out Vector3 hand)
    Parameters
    Type Name Description
    Vector3 root

    Root of the rig.

    Vector3 shoulder

    Shoulder of the rig.

    Vector3 hand

    Hand of the rig.

    MutateCameraState(ref CameraState, Single)

    Orients the camera to match the Follow target's orientation

    Declaration
    public override void MutateCameraState(ref CameraState curState, float deltaTime)
    Parameters
    Type Name Description
    CameraState curState

    The current camera state

    Single deltaTime

    Elapsed time since last frame, for damping calculations.
    If negative, previous state is reset.

    Overrides
    CinemachineComponentBase.MutateCameraState(ref CameraState, Single)

    OnTargetObjectWarped(Transform, Vector3)

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

    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
    CinemachineComponentBase.OnTargetObjectWarped(Transform, Vector3)
    Back to top
    Terms of use
    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