Class PoseControl
A control representing a Pose in 3D space, relative to an XR tracking origin
Inherited Members
Namespace: UnityEngine.InputSystem.XR
Syntax
[Preserve]
public class PoseControl : InputControl<PoseState>
Remarks
Note that unlike most other control types, PoseControls
do not have
a flexible memory layout. They are hardwired to PoseState and
will not work correctly with a different memory layouts. Additional fields may
be appended to the struct but what's there in the struct has to be located
at exactly those memory addresses.
For more information on tracking origins see TrackingOriginModeFlags.
Constructors
PoseControl()
Default-initialize the pose control.
Declaration
public PoseControl()
Remarks
Sets the format to "Pose"
.
Properties
angularVelocity
The angular velocity of this tracked pose relative to the tracking origin.
Declaration
public Vector3Control angularVelocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3Control | Control representing whether the pose is being fully tracked. Maps to the angularVelocity value of the pose retrieved from this control. |
Remarks
The data for this control is only valid if the value returned from trackingState contains AngularVelocity value.
See Also
isTracked
Represents whether this pose is fully tracked or unavailable/simulated.
Declaration
public ButtonControl isTracked { get; set; }
Property Value
Type | Description |
---|---|
ButtonControl | Control representing whether the pose is being fully tracked. Maps to the isTracked value. |
See Also
position
The position, in meters, of this tracked pose relative to the tracking origin.
Declaration
public Vector3Control position { get; set; }
Property Value
Type | Description |
---|---|
Vector3Control | Control representing whether the pose is being fully tracked. Maps to the position value of the pose retrieved from this control. |
Remarks
The data for this control is only valid if the value returned from trackingState contains Position value.
See Also
rotation
The rotation of this tracked pose relative to the tracking origin.
Declaration
public QuaternionControl rotation { get; set; }
Property Value
Type | Description |
---|---|
QuaternionControl | Control representing whether the pose is being fully tracked. Maps to the rotation value of the pose retrieved from this control. |
Remarks
The data for this control is only valid if the value returned from trackingState contains Rotation value.
See Also
trackingState
The other controls on this PoseControl that are currently reporting data.
Declaration
public IntegerControl trackingState { get; set; }
Property Value
Type | Description |
---|---|
IntegerControl | Control representing whether the pose is being fully tracked. Maps to the trackingState value of the pose retrieved from this control. |
Remarks
This can be missing values when the device tracking this pose is restricted or not tracking properly.
See Also
velocity
The velocity, in meters per second, of this tracked pose relative to the tracking origin.
Declaration
public Vector3Control velocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3Control | Control representing whether the pose is being fully tracked. Maps to the velocity value of the pose retrieved from this control. |
Remarks
The data for this control is only valid if the value returned from trackingState contains Velocity value.
See Also
Methods
CalculateOptimizedControlDataType()
Declaration
protected override FourCC CalculateOptimizedControlDataType()
Returns
Type | Description |
---|---|
FourCC |
Overrides
FinishSetup()
Declaration
protected override void FinishSetup()
Overrides
ReadUnprocessedValueFromState(Void*)
Declaration
public override PoseState ReadUnprocessedValueFromState(void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
Void* | statePtr |
Returns
Type | Description |
---|---|
PoseState |
Overrides
WriteValueIntoState(PoseState, Void*)
Declaration
public override void WriteValueIntoState(PoseState value, void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
PoseState | value | |
Void* | statePtr |