Struct AxisState.Recentering | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct AxisState.Recentering

    Helper for automatic axis recentering

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Cinemachine
    Syntax
    [DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
    public struct Recentering

    Constructors

    Recentering(Boolean, Single, Single)

    Constructor with specific field values

    Declaration
    public Recentering(bool enabled, float recenterWaitTime, float recenteringSpeed)
    Parameters
    Type Name Description
    System.Boolean enabled
    System.Single recenterWaitTime
    System.Single recenteringSpeed

    Fields

    m_enabled

    If checked, will enable automatic recentering of the axis. If FALSE, recenting is disabled.

    Declaration
    public bool m_enabled
    Field Value
    Type Description
    System.Boolean

    m_RecenteringTime

    Maximum angular speed of recentering. Will accelerate into and decelerate out of this

    Declaration
    public float m_RecenteringTime
    Field Value
    Type Description
    System.Single

    m_WaitTime

    If no input has been detected, the camera will wait this long in seconds before moving its heading to the default heading.

    Declaration
    public float m_WaitTime
    Field Value
    Type Description
    System.Single

    Methods

    CancelRecentering()

    Cancel any recenetering in progress.

    Declaration
    public void CancelRecentering()

    DoRecentering(ref AxisState, Single, Single)

    Bring the axis back to the cenetered state.

    Declaration
    public void DoRecentering(ref AxisState axis, float deltaTime, float recenterTarget)
    Parameters
    Type Name Description
    AxisState axis
    System.Single deltaTime
    System.Single recenterTarget

    Validate()

    Call this from OnValidate()

    Declaration
    public void Validate()
    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