Struct PoseState
State layout for a single pose.
Namespace: UnityEngine.InputSystem.XR
Syntax
public struct PoseState : IInputStateTypeInfo
Remarks
This is the low-level memory representation of a single pose, i.e the way poses are internally transmitted and stored in the system. PoseStates are used on devices containing PoseControls.
Constructors
PoseState(Boolean, XR.InputTrackingState, Vector3, Quaternion, Vector3, Vector3)
Constructor for PoseStates.
Useful for creating PoseStates locally (not from PoseControl).
Declaration
public PoseState(bool isTracked, XR.InputTrackingState trackingState, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isTracked | Value to use for isTracked |
XR.InputTrackingState | trackingState | Value to use for trackingState |
Vector3 | position | Value to use for position |
Quaternion | rotation | Value to use for rotation |
Vector3 | velocity | Value to use for velocity |
Vector3 | angularVelocity | Value to use for angularVelocity |
Fields
angularVelocity
The angular velocity in 3D space, relative to the tracking origin where this pose represents.
Declaration
public Vector3 angularVelocity
Field Value
Type | Description |
---|---|
Vector3 |
Remarks
This field is only valid if trackingState contains the
isTracked
Whether the pose is currently being fully tracked. Otherwise, the tracking is either unavailable, or simulated.
Declaration
public bool isTracked
Field Value
Type | Description |
---|---|
Boolean |
Remarks
Fully tracked means that the pose is accurate and not using any simulated or extrapolated positions, and the system tracking this pose is able to confidently track this object.
position
The position in 3D space, relative to the tracking origin where this pose represents.
Declaration
public Vector3 position
Field Value
Type | Description |
---|---|
Vector3 |
Remarks
Positions are represented in meters.
This field is only valid if trackingState contains the
rotation
The rotation in 3D space, relative to the tracking origin where this pose represents.
Declaration
public Quaternion rotation
Field Value
Type | Description |
---|---|
Quaternion |
Remarks
This field is only valid if trackingState contains the
trackingState
A Flags Enumeration specifying which other fields in the pose state are valid.
Declaration
public XR.InputTrackingState trackingState
Field Value
Type | Description |
---|---|
XR.InputTrackingState |
velocity
The velocity in 3D space, relative to the tracking origin where this pose represents.
Declaration
public Vector3 velocity
Field Value
Type | Description |
---|---|
Vector3 |
Remarks
Velocities are represented in meters per second.
This field is only valid if trackingState contains the
Properties
format
Memory format tag for PoseState.
Declaration
public FourCC format { get; }
Property Value
Type | Description |
---|---|
FourCC | Returns "Pose". |