-
-
Notifications
You must be signed in to change notification settings - Fork 21
Visor lifecycle
Bogdan T. edited this page May 23, 2025
·
31 revisions
Visor supports three play modes. Each mode controls whether the VR session is initialized and when VR is rendered, i.e. active
-
Behavior
- VR session never ininitialized
- Can be played without VR runtime/hardware
- Modifies only rendering of remote VR players (if connected to server supporting Visor through mod or plugin)
The full VR subsystem is available. Three Boolean flags control runtime behavior:
| Flag |
true means… |
false means… |
|---|---|---|
VR_INITIALIZED |
VR session has been successfully created and is ready for rendering | No VR session is available; VR cannot render |
VR_ACTIVE |
VR is rendering | Rendering falls back to vanilla (unless the server disabled vanilla support). |
VR_FOCUSED |
VR is fully functional | In-game menu overlay is shown and non-essential VR visuals are disabled to save performance. |
-
Initialization
- On startup (unless in
VR_DISABLED), attempt to create the XR session. - If successful, set
VR_INITIALIZED = true.
- On startup (unless in
-
Activation
- When
VR_INITIALIZED == trueand the user dons the HMD, setVR_ACTIVE = true. - If the HMD is removed (or the server prohibits vanilla fallback), set
VR_ACTIVE = false.
- When
-
Focus
- While
VR_ACTIVE == true, monitor for system/menu overlays. - If the user opens any non-game UI (pause menu, Steam overlay, etc.), set
VR_FOCUSED = false. - When the game view regains focus, set
VR_FOCUSED = true.
- While
-
Description
The VR session is initialized at client startup, but remains inactive until the player joins a world. -
Behavior
- On startup, set
isInitialized = true. - Keep
isActive = falseuntil the client enters a world/level.
- On startup, set