docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRHandDevice

    An InputDevice that surfaces common controller data populated by hand joint poses. Devices will only be created if hand-tracking is enabled in the build settings for the target platform.

    Inheritance
    object
    InputControl
    InputDevice
    TrackedDevice
    XRHandDevice
    Inherited Members
    TrackedDevice.trackingState
    TrackedDevice.isTracked
    TrackedDevice.devicePosition
    TrackedDevice.deviceRotation
    InputDevice.InvalidDeviceId
    InputDevice.description
    InputDevice.enabled
    InputDevice.canRunInBackground
    InputDevice.added
    InputDevice.remote
    InputDevice.native
    InputDevice.updateBeforeRender
    InputDevice.deviceId
    InputDevice.lastUpdateTime
    InputDevice.wasUpdatedThisFrame
    InputDevice.allControls
    InputDevice.valueType
    InputDevice.valueSizeInBytes
    InputDevice.all
    InputDevice.ReadValueFromBufferAsObject(void*, int)
    InputDevice.ReadValueFromStateAsObject(void*)
    InputDevice.ReadValueFromStateIntoBuffer(void*, void*, int)
    InputDevice.CompareValue(void*, void*)
    InputDevice.MakeCurrent()
    InputDevice.OnAdded()
    InputDevice.OnRemoved()
    InputDevice.OnConfigurationChanged()
    InputDevice.ExecuteCommand<TCommand>(ref TCommand)
    InputDevice.ExecuteCommand(InputDeviceCommand*)
    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.this[string]
    InputControl.magnitude
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(void*)
    InputControl.WriteValueFromBufferIntoState(void*, int, void*)
    InputControl.WriteValueFromObjectIntoState(object, 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
    InputControl.optimizedControlDataType
    InputControl.CalculateOptimizedControlDataType()
    InputControl.ApplyParameterChanges()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Hands
    Assembly: Unity.XR.Hands.dll
    Syntax
    [InitializeOnLoad]
    [Preserve]
    public class XRHandDevice : TrackedDevice
    Remarks

    The UnityEngine.InputSystem.TrackedDevice.devicePosition and UnityEngine.InputSystem.TrackedDevice.deviceRotation inherited from UnityEngine.InputSystem.TrackedDevice represent the wrist pose.

    Use the XROrigin in the scene to position and orient the device and gesture poses properly. If you are using this data to set the Transform of a GameObject in the scene hierarchy, you can set the local position and rotation of the Transform and make it a child of the CameraOffset object below the XROrigin. Otherwise, you can use the Transform of the CameraOffset to transform the data into world space.

    Properties

    gripPosition

    Position of the grip pose, representing the palm. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.

    Declaration
    [Preserve]
    public Vector3Control gripPosition { get; }
    Property Value
    Type Description
    Vector3Control

    gripRotation

    Rotation of the grip pose, representing the palm. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.

    Declaration
    [Preserve]
    public QuaternionControl gripRotation { get; }
    Property Value
    Type Description
    QuaternionControl

    leftHand

    The left-hand InputDevice that contains UnityEngine.InputSystem.InputControls that surface common controller data populated by hand joint poses.

    Declaration
    public static XRHandDevice leftHand { get; }
    Property Value
    Type Description
    XRHandDevice

    pinchPosition

    Position of the pinch pose, representing the thumb's tip. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.

    Declaration
    [Preserve]
    public Vector3Control pinchPosition { get; }
    Property Value
    Type Description
    Vector3Control

    pinchRotation

    Rotation of the pinch pose, representing the thumb's tip. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.

    Declaration
    [Preserve]
    public QuaternionControl pinchRotation { get; }
    Property Value
    Type Description
    QuaternionControl

    pokePosition

    Position of the poke pose, representing the index finger's tip. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.

    Declaration
    [Preserve]
    public Vector3Control pokePosition { get; }
    Property Value
    Type Description
    Vector3Control

    pokeRotation

    Rotation of the poke pose, representing the index finger's tip. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.

    Declaration
    [Preserve]
    public QuaternionControl pokeRotation { get; }
    Property Value
    Type Description
    QuaternionControl

    rightHand

    The right-hand InputDevice that contains UnityEngine.InputSystem.InputControls that surface common controller data populated by hand joint poses.

    Declaration
    public static XRHandDevice rightHand { get; }
    Property Value
    Type Description
    XRHandDevice

    Methods

    FinishSetup()

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

    Declaration
    protected override void FinishSetup()
    Overrides
    UnityEngine.InputSystem.TrackedDevice.FinishSetup()
    In This Article
    Back to top
    Copyright © 2024 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)