Version: 2023.2
LanguageEnglish
  • C#

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Describes the state of a node tracked by a XR system.

To track available XR nodes and acquire state data, handle the InputTracking.nodeAdded and InputTracking.nodeRemoved events or call InputTracking.GetNodeStates.
Not all XR platforms provide complete tracking data. Use the methods XRNodeState.TryGetPosition, XRNodeState.TryGetRotation, etc. to read the data if it's available.

XR devices can be accessed in different ways, with the XR Node representing a physical input source such as a head position, hand, or camera.
See XR Input for an overview of accessing XR devices.

Properties

accelerationSets the vector representing the current acceleration of the tracked node.
angularAccelerationSets the vector representing the current angular acceleration of the tracked node.
angularVelocitySets the vector representing the current angular velocity of the tracked node.
nodeTypeThe type of the tracked node as specified in XRNode.
positionSets the vector representing the current position of the tracked node.
rotationSets the quaternion representing the current rotation of the tracked node.
tracked Set to true if the node is presently being tracked by the underlying XR system, and false if the node is not presently being tracked by the underlying XR system.
uniqueIDThe unique identifier of the tracked node.
velocitySets the vector representing the current velocity of the tracked node.

Public Methods

TryGetAccelerationAttempt to retrieve a vector representing the current acceleration of the tracked node.
TryGetAngularAccelerationAttempt to retrieve a Vector3 representing the current angular acceleration of the tracked node.
TryGetAngularVelocityAttempt to retrieve a Vector3 representing the current angular velocity of the tracked node.
TryGetPositionAttempt to retrieve a vector representing the current position of the tracked node.
TryGetRotationAttempt to retrieve a quaternion representing the current rotation of the tracked node.
TryGetVelocityAttempt to retrieve a vector representing the current velocity of the tracked node.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961