Get Device Pose

Get Device Pose

Choose your operating system:

Windows

macOS

Linux

Cross XR-System query that returns a specific device's tracked position and orientation (in tracking space).

Target is Head Mounted Display Function Library

Get Device Pose
XRDevice Id
Is Tracked
Orientation
R 0
P 0
Y0
Has Positional Tracking
Position
X0
Y 0
Z 0

Inputs

In
Exec
XRDevice Id
XRDevice Id Structure (by ref)

Specifies the device you're querying for.

Outputs

Out
Exec
Is Tracked
Boolean

[out] Details if the specified device is tracked (i.e. should the rest of the outputs be used)

Orientation
Rotator

[out] Represents the device's current rotation - NOTE: this value is not late updated and will be behind the render thread

Has Positional Tracking
Boolean

[out] Details if the specified device has positional tracking (i.e. if the position output should be used)

Position
Vector

[out] Represents the device's current position - NOTE: this value is not late updated and will be behind the render thread