Struct VisionOSSpatialPointerState
The input state of a visionOS spatial pointer.
Implements
Inherited Members
Namespace: UnityEngine.XR.VisionOS.InputDevices
Assembly: Unity.XR.VisionOS.dll
Syntax
public struct VisionOSSpatialPointerState : IInputStateTypeInfo
Fields
LayoutName
The layout name of the spatial pointer state struct.
Declaration
public const string LayoutName = "VisionOSSpatialPointer"
Field Value
Type | Description |
---|---|
string |
SizeInBytes
The size in bytes of the spatial pointer state struct.
Declaration
public const int SizeInBytes = 97
Field Value
Type | Description |
---|---|
int |
inputDevicePosition
The input device position of the spatial pointer state.
Declaration
public Vector3 inputDevicePosition
Field Value
Type | Description |
---|---|
Vector3 |
inputDeviceRotation
The input device rotation of the spatial pointer state.
Declaration
public Quaternion inputDeviceRotation
Field Value
Type | Description |
---|---|
Quaternion |
interactionId
The interaction ID of the spatial pointer state.
Declaration
public int interactionId
Field Value
Type | Description |
---|---|
int |
interactionRayRotation
The interaction ray rotation of the spatial pointer state.
Declaration
public Quaternion interactionRayRotation
Field Value
Type | Description |
---|---|
Quaternion |
isTracked
The tracking status of the spatial pointer state.
Declaration
public bool isTracked
Field Value
Type | Description |
---|---|
bool |
kindId
The byte representation of the spatial pointer's VisionOSSpatialPointerKind.
Declaration
public byte kindId
Field Value
Type | Description |
---|---|
byte |
modifierKeys
The modifier key states of the spatial pointer state.
Declaration
public ushort modifierKeys
Field Value
Type | Description |
---|---|
ushort |
phaseId
The byte representation of the spatial pointer's phase Id.
Declaration
public byte phaseId
Field Value
Type | Description |
---|---|
byte |
startRayDirection
The start ray direction of the spatial pointer state.
Declaration
public Vector3 startRayDirection
Field Value
Type | Description |
---|---|
Vector3 |
startRayOrigin
The start ray origin of the spatial pointer state.
Declaration
public Vector3 startRayOrigin
Field Value
Type | Description |
---|---|
Vector3 |
startRayRotation
The start ray rotation of the spatial pointer state.
Declaration
public Quaternion startRayRotation
Field Value
Type | Description |
---|---|
Quaternion |
trackingState
The input tracking state of the spatial pointer state.
Declaration
public InputTrackingState trackingState
Field Value
Type | Description |
---|---|
InputTrackingState |
Properties
Format
The four character format of the spatial pointer state.
Declaration
public static FourCC Format { get; }
Property Value
Type | Description |
---|---|
FourCC |
Kind
Represents the pointer event kind of the pointer state.
Declaration
public VisionOSSpatialPointerKind Kind { get; set; }
Property Value
Type | Description |
---|---|
VisionOSSpatialPointerKind |
format
The four character code representing the input events of the native visionOS backend.
Declaration
public FourCC format { get; }
Property Value
Type | Description |
---|---|
FourCC |
isNoneEndedOrCanceled
Returns true if the state is none, ended or cancelled.
Declaration
public bool isNoneEndedOrCanceled { get; }
Property Value
Type | Description |
---|---|
bool |
phase
The phase of the spatial pointer event.
Declaration
public VisionOSSpatialPointerPhase phase { get; set; }
Property Value
Type | Description |
---|---|
VisionOSSpatialPointerPhase |
Methods
IsModifierKeyPressed(VisionOSSpatialPointerModifierKeys)
Determines if the specified modifier key is pressed.
Declaration
public bool IsModifierKeyPressed(VisionOSSpatialPointerModifierKeys key)
Parameters
Type | Name | Description |
---|---|---|
VisionOSSpatialPointerModifierKeys | key | The key to query it's pressed state. |
Returns
Type | Description |
---|---|
bool | A boolean that represents the pressed state. |
SetModifierKey(bool, ushort)
Manually sets the state of a specific modifier key.
Declaration
public void SetModifierKey(bool state, ushort modifierKey)
Parameters
Type | Name | Description |
---|---|---|
bool | state | The state in which to update the modifier key. |
ushort | modifierKey | The modifier key to update. |