Unable to move player's camera to a specific position

Hello, I was wondering if it is even possible to relocate the player camera to a different position after the scene has been loaded.

The current approach I have tried is the moving main camera that is attached to the XRRig or the whole Rig with no luck at all… I suspect this transform is getting the data from the headset in a read only way so any changes to this value won’t propagate back to the headset transform.

Thank you all for the hard work and dedication building polyspatial, playing around with unity on vision OS has been an amazing experience

So, if i’m right, you want to set the player camera to a specific direction immediately the game start ?

  • If yes, you can use a Quaternion variable and assign it to the Camera rotation, in the “Start” function precisely.

  • You can also try to use the “LookAt” method to make the Camera stare at a specific direction at start.

Idk if it helps, but that’s all what i can do for you if i haven’t misunderstood.

Not necessarily at the start of the scene, imagine you wanted to give the player the ability to move using the gamepads joysticks or to move to a different predefined area of the scenario.

Putting it in simple words, imagine you want the player to move forward after tapping. Usually, just moving the transform of the players camera should be enough but this is not working

I see… What if you try to move the parent object of the camera, rather than the camera itself. If your camera is a child of the XRRig , you can try moving the XRRig instead.

Yeah I have tried moving the XRRig the camera itself and the parent with no luck as I said. Its like the players camera is anchored to the spawn position

I see, it sounds like a tricky situation. If moving the XRRig or the camera itself isn’t working, it might be due to other factors in your project. Here are a few things you could check:

  1. Check for conflicting scripts: Make sure there are no other scripts that might be overriding the camera’s position each frame.
  2. Teleportation: If you’re using an XR plugin like the one provided by Unity, they usually provide a way to “teleport” the player, which effectively moves the XRRig.
  3. Device Tracking: Ensure that device tracking is not resetting the position of the camera or XRRig after you’ve moved it.
  4. Initial Position: Sometimes, the initial position of the XRRig or the camera is stored and used to reset the position every frame. Check if this is the case in your project.