diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-11-07 08:45:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 08:45:24 +0100 |
commit | c4f3b94abf7954d293b847a3a01ef86c8bba4444 (patch) | |
tree | 12a429f08840257239b1baa18e00922815d5378a /scene | |
parent | f814e15c7f60a685e8b3623fc93231c18ccd3627 (diff) | |
parent | 23e0afec1ddd78bde2b528ea480e71664c1ef713 (diff) |
Merge pull request #68321 from BastiaanOlij/xrorigin_start_pos
Update XRServer with starting position of (new) current XROrigin3D
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/xr_nodes.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index f5d30c584f..ca7d1dfc1d 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -644,6 +644,12 @@ void XROrigin3D::set_current(bool p_enabled) { origin_nodes[i]->set_current(false); } } + + // update XRServer with our current position + XRServer *xr_server = XRServer::get_singleton(); + ERR_FAIL_NULL(xr_server); + + xr_server->set_world_origin(get_global_transform()); } else { bool found = false; // We no longer have a current origin so find the first one we can make current |