1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Add support for returning the play area from XRInterface

This commit is contained in:
Bastiaan Olij
2021-06-27 21:51:30 +10:00
parent 4387f9645b
commit 96b707215d
10 changed files with 229 additions and 28 deletions

View File

@@ -370,6 +370,19 @@ void MobileVRInterface::uninitialize() {
};
};
bool MobileVRInterface::supports_play_area_mode(XRInterface::PlayAreaMode p_mode) {
// This interface has no positional tracking so fix this to 3DOF
return p_mode == XR_PLAY_AREA_3DOF;
}
XRInterface::PlayAreaMode MobileVRInterface::get_play_area_mode() const {
return XR_PLAY_AREA_3DOF;
}
bool MobileVRInterface::set_play_area_mode(XRInterface::PlayAreaMode p_mode) {
return p_mode == XR_PLAY_AREA_3DOF;
}
Size2 MobileVRInterface::get_render_target_size() {
_THREAD_SAFE_METHOD_