Struct PoseState
State layout for a single pose.
Implements
Namespace: UnityEngine.InputSystem.XR
Assembly: Unity.InputSystem.dll
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(bool, InputTrackingState, Vector3, Quaternion, Vector3, Vector3)
Constructor for PoseStates.
Useful for creating PoseStates locally (not from PoseControl).
Declaration
public PoseState(bool isTracked, InputTrackingState trackingState, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity)
Parameters
Type | Name | Description |
---|---|---|
bool | isTracked | Value to use for isTracked |
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 |
See Also
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 AngularVelocity value. See TrackingOriginModeFlags for information on tracking origins.
See Also
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 |
---|---|
bool |
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.
See Also
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 Position value. See TrackingOriginModeFlags for information on tracking origins.
See Also
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 Rotation value. See TrackingOriginModeFlags for information on tracking origins.
See Also
trackingState
A Flags Enumeration specifying which other fields in the pose state are valid.
Declaration
public InputTrackingState trackingState
Field Value
Type | Description |
---|---|
InputTrackingState |
See Also
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 Velocity value. See TrackingOriginModeFlags for information on tracking origins.
See Also
Properties
format
Memory format tag for PoseState.
Declaration
public FourCC format { get; }
Property Value
Type | Description |
---|---|
FourCC | Returns "Pose". |