Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

OpenXR: Fix error in editor when composition layer is the root of a scene

David Snopekdd33fbeab119
diff --git a/modules/openxr/scene/openxr_composition_layer.cpp b/modules/openxr/scene/openxr_composition_layer.cpp
index 852eeabff81..372976311d9 100644
--- a/modules/openxr/scene/openxr_composition_layer.cpp
+++ b/modules/openxr/scene/openxr_composition_layer.cpp
@@ -294,7 +294,7 @@ void OpenXRCompositionLayer::update_transform() {
}
Transform3D xf;
- if (parent_is_xr_origin || parent_is_xr_camera) {
+ if (parent_is_xr_origin || parent_is_xr_camera || !is_inside_tree()) {
xf = get_transform();
} else {
if (ancestor_camera) {