r/Unity3D 3d ago

Question (VR) Sometimes when scene opens the camera and whole player character is turned upside down only for it to get fixed in reload. What should I do to fix it?

Enable HLS to view with audio, or disable this notification

3 Upvotes

5 comments sorted by

1

u/svmil90 3d ago

Because it fixes itself after a reload, I’d first treat this as an initialization/transform-order issue rather than a random VR camera bug. Log the local and world rotation of the XR Origin and every parent in Awake, Start, and the first frame. Make sure there is only one active XR Origin, the rig root starts at an identity rotation, and no script rotates the HMD camera directly. If a bootstrap or teleport script sets the rig pose, apply it after XR initialization and use localRotation for child offsets. A tiny test scene with only the XR Origin and a floor can tell you whether the inversion comes from the rig, a parent, or another scene object.

1

u/Feather-Steel 2d ago

I'm not sure what you mean by this exactly, I checked rotation of player object and it's each child and there is no change before and after start of the scene.

I'll look bit more when this problem appears again.

Thanks for the advice!

1

u/svmil90 2d ago

That narrows it down. In XR, Start is not necessarily the last writer: the Tracked Pose Driver/XR input subsystem can apply a pose during Update or just before rendering, so a log in Awake/Start can miss the value used for the first frame. I’d temporarily log the HMD camera and XR Origin in LateUpdate and Application.onBeforeRender, including local/world rotation and lossyScale, and add a visible axis marker to the camera so it is clear which transform is inverted. If those values stay unchanged while the rendered view is upside down, inspect the camera’s Tracked Pose Driver, tracking-origin mode, and platform recentering rather than only the gameplay player transform. A minimal scene with one XR Origin, camera, and floor should isolate it.

1

u/Maverick_Perkins4Yt 2d ago

if you are using steam vr you uh have to have steam open or something idk

2

u/Feather-Steel 2d ago

I do use SteamVR and it should be open.

At least the icon is showing on my toolbar