docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class XRControllerState

    Represents a serializable state of the XR Interactor for use with recording and playback.

    Inheritance
    object
    XRControllerState
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: solution.dll
    Syntax
    [Serializable]
    public class XRControllerState
    Remarks

    Use of this class should be avoided outside of the context of playback and recording. Instead, use XRBaseInputInteractor.LogicalInputState properties in XRBaseInputInteractor when possible.

    Constructors

    Name Description
    XRControllerState()

    Initializes and returns an instance of XRControllerState.

    XRControllerState(double, Vector3, Quaternion, InputTrackingState, bool)

    Initializes and returns an instance of XRControllerState.

    XRControllerState(double, Vector3, Quaternion, InputTrackingState, bool, bool, bool, bool)

    Initializes and returns an instance of XRControllerState.

    XRControllerState(double, Vector3, Quaternion, InputTrackingState, bool, bool, bool, bool, float, float, float)

    Initializes and returns an instance of XRControllerState.

    XRControllerState(XRControllerState)

    Initializes and returns an instance of XRControllerState.

    Fields

    Name Description
    activateInteractionState

    The activate interaction state.

    inputTrackingState

    The input tracking state of the controller.

    isTracked

    Whether the controller is actively tracked.

    position

    The position of the controller.

    rotation

    The rotation of the controller.

    selectInteractionState

    The selection interaction state.

    time

    The time value for this controller.

    uiPressInteractionState

    The UI press interaction state.

    uiScrollValue

    The UI scroll value.

    Methods

    Name Description
    ResetFrameDependentStates()

    Resets all the interaction states that are based on whether they occurred "this frame".

    ToString()

    Converts state data to a string.

    See Also

    XRControllerRecording
    In This Article
    Back to top
    Copyright © 2023 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)