docs.unity.cn
    Show / Hide Table of Contents

    Class CinemachineOrbitalFollow

    This is a CinemachineComponent in the the Body section of the component pipeline. Its job is to position the camera somewhere on a spheroid centered at the Follow target.

    The position on the sphere and the radius of the sphere can be controlled by user input.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    CinemachineComponentBase
    CinemachineOrbitalFollow
    Inherited Members
    CinemachineComponentBase.Epsilon
    CinemachineComponentBase.VirtualCamera
    CinemachineComponentBase.OnEnable()
    CinemachineComponentBase.OnDisable()
    CinemachineComponentBase.FollowTarget
    CinemachineComponentBase.LookAtTarget
    CinemachineComponentBase.FollowTargetAsGroup
    CinemachineComponentBase.FollowTargetPosition
    CinemachineComponentBase.FollowTargetRotation
    CinemachineComponentBase.LookAtTargetAsGroup
    CinemachineComponentBase.LookAtTargetPosition
    CinemachineComponentBase.LookAtTargetRotation
    CinemachineComponentBase.VcamState
    CinemachineComponentBase.PrePipelineMutateCameraState(CameraState, Single)
    CinemachineComponentBase.BodyAppliesAfterAim
    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.destroyCancellationToken
    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, Boolean)
    Component.GetComponentInParent(Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    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.FindObjectsOfType(Type, Boolean)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Unity.Cinemachine
    Syntax
    [AddComponentMenu("Cinemachine/Procedural/Position Control/Cinemachine Orbital Follow")]
    [CameraPipeline(CinemachineCore.Stage.Body)]
    [HelpURL("https://docs.unity.cn/Packages/com.unity.cinemachine@3.0/manual/CinemachineOrbitalFollow.html")]
    public class CinemachineOrbitalFollow : CinemachineComponentBase, IInputAxisOwner, IInputAxisResetSource, CinemachineFreeLookModifier.IModifierValueSource, CinemachineFreeLookModifier.IModifiablePositionDamping, CinemachineFreeLookModifier.IModifiableDistance

    Fields

    HorizontalAxis

    Axis representing the current horizontal rotation. Value is in degrees and represents a rotation about the up vector

    Declaration
    [Tooltip("Axis representing the current horizontal rotation.  Value is in degrees and represents a rotation about the up vector.")]
    public InputAxis HorizontalAxis
    Field Value
    Type Description
    InputAxis

    Orbits

    Defines a complex surface rig from 3 horizontal rings.

    Declaration
    [Tooltip("Defines a complex surface rig from 3 horizontal rings.")]
    public Cinemachine3OrbitRig.Settings Orbits
    Field Value
    Type Description
    Cinemachine3OrbitRig.Settings

    OrbitStyle

    How to construct the surface on which the camera will travel

    Declaration
    [Tooltip("Defines the manner in which the orbit surface is constructed.")]
    public CinemachineOrbitalFollow.OrbitStyles OrbitStyle
    Field Value
    Type Description
    CinemachineOrbitalFollow.OrbitStyles

    RadialAxis

    Axis controlling the scale of the current distance. Value is a scalar multiplier and is applied to the specified camera distance

    Declaration
    [Tooltip("Axis controlling the scale of the current distance.  Value is a scalar multiplier and is applied to the specified camera distance.")]
    public InputAxis RadialAxis
    Field Value
    Type Description
    InputAxis

    Radius

    The camera will be placed at this distance from the Follow target

    Declaration
    [Tooltip("The camera will be placed at this distance from the Follow target.")]
    public float Radius
    Field Value
    Type Description
    Single

    TrackerSettings

    Settings to control damping for target tracking.

    Declaration
    public TrackerSettings TrackerSettings
    Field Value
    Type Description
    TrackerSettings

    VerticalAxis

    Axis representing the current vertical rotation. Value is in degrees and represents a rotation about the right vector

    Declaration
    [Tooltip("Axis representing the current vertical rotation.  Value is in degrees and represents a rotation about the right vector.")]
    public InputAxis VerticalAxis
    Field Value
    Type Description
    InputAxis

    Properties

    IsValid

    True if component is enabled and has a valid Follow target

    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 Body stage

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

    Methods

    ForceCameraPosition(Vector3, Quaternion)

    Force the virtual camera to assume a given position and orientation

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

    World-space position to take

    Quaternion rot

    World-space orientation to take

    Overrides
    CinemachineComponentBase.ForceCameraPosition(Vector3, Quaternion)

    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()

    MutateCameraState(ref CameraState, Single)

    Positions the virtual camera according to the transposer rules.

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

    The current camera state

    Single deltaTime

    Used for damping. If less than 0, no damping is done.

    Overrides
    CinemachineComponentBase.MutateCameraState(ref CameraState, Single)

    OnTargetObjectWarped(Transform, Vector3)

    This is called to notify the user that a target got warped, so that we 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
    CinemachineComponentBase.OnTargetObjectWarped(Transform, Vector3)

    OnTransitionFromCamera(ICinemachineCamera, Vector3, Single)

    Notification that this virtual camera is going live. Base class implementation does nothing.

    Declaration
    public override bool 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

    Single deltaTime

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

    Returns
    Type Description
    Boolean

    True if the vcam should do an internal update as a result of this call

    Overrides
    CinemachineComponentBase.OnTransitionFromCamera(ICinemachineCamera, Vector3, Single)

    Explicit Interface Implementations

    CinemachineFreeLookModifier.IModifiableDistance.Distance

    Declaration
    float CinemachineFreeLookModifier.IModifiableDistance.Distance { get; set; }
    Returns
    Type Description
    Single
    Implements
    CinemachineFreeLookModifier.IModifiableDistance.Distance

    CinemachineFreeLookModifier.IModifiablePositionDamping.PositionDamping

    Declaration
    Vector3 CinemachineFreeLookModifier.IModifiablePositionDamping.PositionDamping { get; set; }
    Returns
    Type Description
    Vector3
    Implements
    CinemachineFreeLookModifier.IModifiablePositionDamping.PositionDamping

    CinemachineFreeLookModifier.IModifierValueSource.NormalizedModifierValue

    Declaration
    float CinemachineFreeLookModifier.IModifierValueSource.NormalizedModifierValue { get; }
    Returns
    Type Description
    Single
    Implements
    CinemachineFreeLookModifier.IModifierValueSource.NormalizedModifierValue

    IInputAxisOwner.GetInputAxes(List<IInputAxisOwner.AxisDescriptor>)

    Report the available input axes

    Declaration
    void IInputAxisOwner.GetInputAxes(List<IInputAxisOwner.AxisDescriptor> axes)
    Parameters
    Type Name Description
    List<IInputAxisOwner.AxisDescriptor> axes

    Output list to which the axes will be added

    Implements
    IInputAxisOwner.GetInputAxes(List<IInputAxisOwner.AxisDescriptor>)

    IInputAxisResetSource.HasResetHandler

    Inspector checks this and displays warning if no handler

    Declaration
    bool IInputAxisResetSource.HasResetHandler { get; }
    Returns
    Type Description
    Boolean
    Implements
    IInputAxisResetSource.HasResetHandler

    IInputAxisResetSource.RegisterResetHandler(Action)

    Register a handler that will be called when input needs to be reset

    Declaration
    void IInputAxisResetSource.RegisterResetHandler(Action handler)
    Parameters
    Type Name Description
    Action handler

    The handler to register

    Implements
    IInputAxisResetSource.RegisterResetHandler(Action)

    IInputAxisResetSource.UnregisterResetHandler(Action)

    Unregister a handler that will be called when input needs to be reset

    Declaration
    void IInputAxisResetSource.UnregisterResetHandler(Action handler)
    Parameters
    Type Name Description
    Action handler

    The handler to unregister

    Implements
    IInputAxisResetSource.UnregisterResetHandler(Action)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Saturday, May 6, 2023