# XRNodeState

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

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.XR](/engine/6000.7/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

```csharp
public struct XRNodeState
```

## Remarks

To track available XR nodes and acquire state data, handle the [\_nodeAdded](/engine/6000.7/script-reference/unityengine/xr/inputtracking/nodeadded.md) and [\_nodeRemoved](/engine/6000.7/script-reference/unityengine/xr/inputtracking/noderemoved.md) events or call [InputTracking.GetNodeStates](/engine/6000.7/script-reference/unityengine/xr/inputtracking/getnodestates.md).

Not all XR platforms provide complete tracking data. Use the methods [XRNodeState.TryGetPosition](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetposition.md), [XRNodeState.TryGetRotation](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetrotation.md), 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](/engine/6000.7/manual/input/xr_input.md) for an overview of accessing XR devices.

## Properties

| Property                                                                                                 | Description                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [acceleration](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/acceleration.md)               | Sets the vector representing the current acceleration of the tracked node.                                                                                        |
| [angularAcceleration](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/angularacceleration.md) | Sets the vector representing the current angular acceleration of the tracked node.                                                                                |
| [angularVelocity](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/angularvelocity.md)         | Sets the vector representing the current angular velocity of the tracked node.                                                                                    |
| [nodeType](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/nodetype.md)                       | The type of the tracked node as specified in [XRNode](/engine/6000.7/script-reference/unityengine/xr/xrnode.md).                                                  |
| [position](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/position.md)                       | Sets the vector representing the current position of the tracked node.                                                                                            |
| [rotation](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/rotation.md)                       | Sets the quaternion representing the current rotation of the tracked node.                                                                                        |
| [tracked](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/tracked.md)                         | 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. |
| [uniqueID](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/uniqueid.md)                       | The unique identifier of the tracked node.                                                                                                                        |
| [velocity](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/velocity.md)                       | Sets the vector representing the current velocity of the tracked node.                                                                                            |

## Methods

| Method                                                                                                               | Description                                                                                      |
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [TryGetAcceleration](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetacceleration.md)               | Attempt to retrieve a vector representing the current acceleration of the tracked node.          |
| [TryGetAngularAcceleration](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetangularacceleration.md) | Attempt to retrieve a Vector3 representing the current angular acceleration of the tracked node. |
| [TryGetAngularVelocity](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetangularvelocity.md)         | Attempt to retrieve a Vector3 representing the current angular velocity of the tracked node.     |
| [TryGetPosition](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetposition.md)                       | Attempt to retrieve a vector representing the current position of the tracked node.              |
| [TryGetRotation](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetrotation.md)                       | Attempt to retrieve a quaternion representing the current rotation of the tracked node.          |
| [TryGetVelocity](/engine/6000.7/script-reference/unityengine/xr/xrnodestate/trygetvelocity.md)                       | Attempt to retrieve a vector representing the current velocity of the tracked node.              |
