XR Origin Desync on Scene Change
Under Audit
Unity 6.3.x - Unity 6.3.x
Published 6 days ago
When transitioning between scenes using SceneManager.LoadScene(), the Main Camera and your controllers may not reliably spawn at the new scene's XR Origin location, retaining their previous global position.
When transitioning between scenes using SceneManager.LoadScene(), the Main Camera and your controllers may not spawn at the designated XR Origin location in the new scene. Instead, these objects retain their global position from the previous scene, even if the XR Origin in the target scene is placed at 0, 0, 0. This behavior is observed when XR Origin objects are copied from a VR template scene into new scenes. Investigations into the XR Origin components and attempts to modify GameObject transforms in scene loading scripts have not resolved the issue. Specific configurations include disabling far interaction in the Near-Far Interactor component of the XR Origin prefab and adding a Tracked Pose Driver (though currently disabled). The problem has been observed when testing within the Unity editor using XR Interaction Simulator.
- Ensure that the
Main Cameraand any tracked controllers are direct children of the**XR Origin**. - Manually reset the
Transform.positionof theMain Cameraand your controllers to match the**XR Origin**’s position after the scene has fully loaded. - Verify that no
GameObjectwith the**XR Origin**or its critical children hasDontDestroyOnLoadapplied, which would prevent its destruction and proper re-initialization in the new scene.
Editor's Note:
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.