VRTrackingFlags ( )

Parameters

None.

Description

Returns how well the headset is being tracked, as bit flags.

1 - orientation is valid
2 - position is valid
4 - orientation is actively tracked
8 - position is actively tracked

15 means fully tracked. The headset view needs both valid flags (1 and 2); without them the engine stops drawing the stereo view until tracking returns. A headset that is losing sight of its sensors can still give valid estimates with the actively tracked flags cleared.

Returns 0 when there is no usable tracking sample yet. Use it to show a "tracking lost" message, or to wait for good tracking before VRRecenter.

Automatic VR is experimental, and works in 64-bit Windows programs through an OpenXR runtime and Direct3D 12. In 32-bit programs the commands are there, so the same source compiles, but InitVR returns False and VRLastError says why.

For the full story - setup, frame rules and limitations - see the Automatic PC VR guide and its complete AutomaticVR.bb sample.


See also: VRRecenter, VRVisible, VRState.

Index