[PUN 2] Camera “freezes” in the Oculus Quest when second player joins room.

I'm building a Unity VR multiplayer application, following this course on Udemy. In the course, they use the Unity XR Interaction toolkit, but I've been using the Oculus Integration package instead. So far, this hasn't created any significant problems - until I begin testing with two players.

I've been running into a problem where the moment a second player enters a room, the camera inside the VR headset goes wonky. It becomes frozen or fixed at a certain position, as if the world is stuck to the camera. I know that the scene still runs because I tried it with my headset pointing at a campfire with particle effects, which were still moving and running fine. I found a link here that describes pretty much exactly the problem I'm running into, except their solution didn't work for me. I also don't have control over my hands / avatar - it's like I'm being placed in the headset but I'm not actually there. I'm quite baffled, and I'm not sure what to do anymore.

I created a bare minimum application here with two scenes that duplicates the issue. One weird thing is when I open the application in my Quest, and then open it in my editor, and then close and reopen the application in the editor one more time, the camera in my Quest goes back to normal, but I still can't do anything with my controllers.

Before anyone mentions it, I've set in script to have a player's OVRCameraRig become disabled if IsMine is false (ie, so camera rigs aren't kept on for remote players). So at all times, there will only be one camera rig in the scene for the local player.

Comments

  • TobiasTobias admin
    Camera and hands don't move at all anymore but the Update() loop is running as usual?
    That sounds as if the controlling scripts make a bad check for who is controlling them and if they should react to local input (head/hand movement).
    I would look into the scripts that react to input and make sure they still run locally but not for proxies / remote players.
  • @Tobias yep, I've turned off all of the components of remote player controllers that take in input (so all that is active are the charactercapsule mesh and the avatar mesh).
Sign In or Register to comment.