docs.unity3d.com
    Show / Hide Table of Contents

    Class PoseControl

    A control representing a Pose in 3D space, relative to an XR tracking origin

    Inheritance
    Object
    InputControl
    InputControl<PoseState>
    PoseControl
    Inherited Members
    InputControl<PoseState>.valueType
    InputControl<PoseState>.valueSizeInBytes
    InputControl<PoseState>.ReadValue()
    InputControl<PoseState>.ReadValueFromPreviousFrame()
    InputControl<PoseState>.ReadDefaultValue()
    InputControl<PoseState>.ReadValueFromState(Void*)
    InputControl<PoseState>.ReadUnprocessedValue()
    InputControl<PoseState>.ReadValueFromStateAsObject(Void*)
    InputControl<PoseState>.ReadValueFromStateIntoBuffer(Void*, Void*, Int32)
    InputControl<PoseState>.WriteValueFromBufferIntoState(Void*, Int32, Void*)
    InputControl<PoseState>.WriteValueFromObjectIntoState(Object, Void*)
    InputControl<PoseState>.ReadValueFromBufferAsObject(Void*, Int32)
    InputControl<PoseState>.CompareValue(Void*, Void*)
    InputControl<PoseState>.ProcessValue(PoseState)
    InputControl.name
    InputControl.displayName
    InputControl.shortDisplayName
    InputControl.path
    InputControl.layout
    InputControl.variants
    InputControl.device
    InputControl.parent
    InputControl.children
    InputControl.usages
    InputControl.aliases
    InputControl.stateBlock
    InputControl.noisy
    InputControl.synthetic
    InputControl.Item[String]
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(Void*)
    InputControl.TryGetChildControl(String)
    InputControl.TryGetChildControl<TControl>(String)
    InputControl.GetChildControl(String)
    InputControl.GetChildControl<TControl>(String)
    InputControl.RefreshConfigurationIfNeeded()
    InputControl.RefreshConfiguration()
    InputControl.m_StateBlock
    InputControl.currentStatePtr
    InputControl.previousFrameStatePtr
    InputControl.defaultStatePtr
    InputControl.noiseMaskPtr
    InputControl.stateOffsetRelativeToDeviceRoot
    Namespace: UnityEngine.InputSystem.XR
    Syntax
    public class PoseControl : InputControl<PoseState>
    Remarks

    Note that unlike most other control types, PoseControls do not have a flexible memory layout. They are hardwired to PoseState and will not work correctly with a different memory layouts. Additional fields may be appended to the struct but what's there in the struct has to be located at exactly those memory addresses.

    For more information on tracking origins see .

    Constructors

    PoseControl()

    Default-initialize the pose control.

    Declaration
    public PoseControl()
    Remarks

    Sets the format to "Pose".

    Properties

    angularVelocity

    The angular velocity of this tracked pose relative to the tracking origin.

    Declaration
    public Vector3Control angularVelocity { get; }
    Property Value
    Type Description
    Vector3Control

    Control representing whether the pose is being fully tracked. Maps to the angularVelocity value of the pose retrieved from this control.

    Remarks

    The data for this control is only valid if the value returned from trackingState contains value.

    See Also
    angularVelocity

    isTracked

    Represents whether this pose is fully tracked or unavailable/simulated.

    Declaration
    public ButtonControl isTracked { get; }
    Property Value
    Type Description
    ButtonControl

    Control representing whether the pose is being fully tracked. Maps to the isTracked value.

    See Also
    isTracked

    position

    The position, in meters, of this tracked pose relative to the tracking origin.

    Declaration
    public Vector3Control position { get; }
    Property Value
    Type Description
    Vector3Control

    Control representing whether the pose is being fully tracked. Maps to the position value of the pose retrieved from this control.

    Remarks

    The data for this control is only valid if the value returned from trackingState contains value.

    See Also
    position

    rotation

    The rotation of this tracked pose relative to the tracking origin.

    Declaration
    public QuaternionControl rotation { get; }
    Property Value
    Type Description
    QuaternionControl

    Control representing whether the pose is being fully tracked. Maps to the rotation value of the pose retrieved from this control.

    Remarks

    The data for this control is only valid if the value returned from trackingState contains value.

    See Also
    rotation

    trackingState

    The other controls on this PoseControl that are currently reporting data.

    Declaration
    public IntegerControl trackingState { get; }
    Property Value
    Type Description
    IntegerControl

    Control representing whether the pose is being fully tracked. Maps to the trackingState value of the pose retrieved from this control.

    Remarks

    This can be missing values when the device tracking this pose is restricted or not tracking properly.

    See Also
    trackingState

    velocity

    The velocity, in meters per second, of this tracked pose relative to the tracking origin.

    Declaration
    public Vector3Control velocity { get; }
    Property Value
    Type Description
    Vector3Control

    Control representing whether the pose is being fully tracked. Maps to the velocity value of the pose retrieved from this control.

    Remarks

    The data for this control is only valid if the value returned from trackingState contains value.

    See Also
    velocity

    Methods

    FinishSetup()

    Perform final initialization tasks after the control hierarchy has been put into place.

    Declaration
    protected override void FinishSetup()
    Overrides
    InputControl.FinishSetup()
    Remarks

    This method can be overridden to perform control- or device-specific setup work. The most common use case is for looking up child controls and storing them in local getters.

    public class MyDevice : InputDevice
    {
        public ButtonControl button { get; private set; }
        public AxisControl axis { get; private set; }
    
        protected override void OnFinishSetup()
        {
            // Cache controls in getters.
            button = GetChildControl("button");
            axis = GetChildControl("axis");
        }
    }

    ReadUnprocessedValueFromState(Void*)

    Declaration
    public override PoseState ReadUnprocessedValueFromState(void *statePtr)
    Parameters
    Type Name Description
    Void* statePtr
    Returns
    Type Description
    PoseState
    Overrides
    UnityEngine.InputSystem.InputControl<UnityEngine.InputSystem.XR.PoseState>.ReadUnprocessedValueFromState(System.Void*)

    WriteValueIntoState(PoseState, Void*)

    Declaration
    public override void WriteValueIntoState(PoseState value, void *statePtr)
    Parameters
    Type Name Description
    PoseState value
    Void* statePtr
    Overrides
    UnityEngine.InputSystem.InputControl<UnityEngine.InputSystem.XR.PoseState>.WriteValueIntoState(UnityEngine.InputSystem.XR.PoseState, System.Void*)

    Extension Methods

    InputControlExtensions.FindInParentChain<TControl>(InputControl)
    InputControlExtensions.IsPressed(InputControl, Single)
    InputControlExtensions.IsActuated(InputControl, Single)
    InputControlExtensions.ReadValueAsObject(InputControl)
    InputControlExtensions.ReadValueIntoBuffer(InputControl, Void*, Int32)
    InputControlExtensions.ReadDefaultValueAsObject(InputControl)
    InputControlExtensions.ReadValueFromEvent<TValue>(InputControl<TValue>, InputEventPtr)
    InputControlExtensions.ReadValueFromEvent<TValue>(InputControl<TValue>, InputEventPtr, out TValue)
    InputControlExtensions.ReadValueFromEventAsObject(InputControl, InputEventPtr)
    InputControlExtensions.ReadUnprocessedValueFromEvent<TValue>(InputControl<TValue>, InputEventPtr)
    InputControlExtensions.ReadUnprocessedValueFromEvent<TValue>(InputControl<TValue>, InputEventPtr, out TValue)
    InputControlExtensions.WriteValueFromObjectIntoEvent(InputControl, InputEventPtr, Object)
    InputControlExtensions.WriteValueIntoState(InputControl, Void*)
    InputControlExtensions.WriteValueIntoState<TValue>(InputControl, TValue, Void*)
    InputControlExtensions.WriteValueIntoState<TValue>(InputControl<TValue>, TValue, Void*)
    InputControlExtensions.WriteValueIntoState<TValue>(InputControl<TValue>, Void*)
    InputControlExtensions.WriteValueIntoState<TValue, TState>(InputControl<TValue>, TValue, ref TState)
    InputControlExtensions.WriteValueIntoEvent<TValue>(InputControl, TValue, InputEventPtr)
    InputControlExtensions.WriteValueIntoEvent<TValue>(InputControl<TValue>, TValue, InputEventPtr)
    InputControlExtensions.CheckStateIsAtDefault(InputControl)
    InputControlExtensions.CheckStateIsAtDefault(InputControl, Void*, Void*)
    InputControlExtensions.CheckStateIsAtDefaultIgnoringNoise(InputControl)
    InputControlExtensions.CheckStateIsAtDefaultIgnoringNoise(InputControl, Void*)
    InputControlExtensions.CompareStateIgnoringNoise(InputControl, Void*)
    InputControlExtensions.CompareState(InputControl, Void*, Void*, Void*)
    InputControlExtensions.CompareState(InputControl, Void*, Void*)
    InputControlExtensions.HasValueChangeInState(InputControl, Void*)
    InputControlExtensions.HasValueChangeInEvent(InputControl, InputEventPtr)
    InputControlExtensions.GetStatePtrFromStateEvent(InputControl, InputEventPtr)
    InputControlExtensions.ResetToDefaultStateInEvent(InputControl, InputEventPtr)
    InputControlExtensions.QueueValueChange<TValue>(InputControl<TValue>, TValue, Double)
    InputControlExtensions.FindControlsRecursive<TControl>(InputControl, IList<TControl>, Func<TControl, Boolean>)
    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