1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

[OpenXR] Fix LOCAL_FLOOR emulation on HTC Vive XR Elite

This commit is contained in:
David Snopek
2024-06-27 14:12:11 -05:00
parent 374807f427
commit 06e81d9fe4
2 changed files with 92 additions and 60 deletions

View File

@@ -165,8 +165,16 @@ private:
XrSpace view_space = XR_NULL_HANDLE;
XRPose::TrackingConfidence head_pose_confidence = XRPose::XR_TRACKING_CONFIDENCE_NONE;
bool emulating_local_floor = false;
bool should_reset_emulated_floor_height = false;
// When LOCAL_FLOOR isn't supported, we use an approach based on the example code in the
// OpenXR spec in order to emulate it.
// See: https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_local_floor
struct LocalFloorEmulation {
bool enabled = false;
XrSpace local_space = XR_NULL_HANDLE;
XrSpace stage_space = XR_NULL_HANDLE;
bool should_reset_floor_height = false;
} local_floor_emulation;
bool reset_emulated_floor_height();
bool load_layer_properties();