Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Resolved On VR local client, all other clients are moving in sync

Discussion in 'Netcode for GameObjects' started by Faune, May 17, 2024.

  1. Faune

    Faune

    Joined:
    Sep 21, 2018
    Posts:
    2
    I'm working on a multiplayer experience in which several clients (VR headsets) connect to a host PC. Using NGO and Meta XR Core SDK for VR.
    My problem is as follows: each VR client makes the other clients move in synchronisation with it (locally only, the other clients don't see it move). I just want to get the classic behaviour where the local client moves according to the movements of the VR headset but the other clients should not follow these movements.
    Something weird is that when i try in editor, without enabling Oculus Link, everything is working as expected.

    I haven't added any components that depend on NGO apart from the NetworkManager and the NetworkObjects on the players' prefabs.

    Any help would be really appreciated :)
    Thanks
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,000
    Not even NetworkTransform? If so, no transform changes will be synchronized unless you do so manually, eg via RPC.

    Sooo ... does your code perhaps run on every player instance rather than just the owning (local) player?
    And without a NetworkTransform it seems logical for the others not to see these movements.
     
  3. Faune

    Faune

    Joined:
    Sep 21, 2018
    Posts:
    2
    Thanks to your answered i just decided to disable all the components one by one on the other clients (not owned by local client) and it seems like disabling the OVRCameraRig solves the problem. I made some VR projects in the past (but it's the first one with NGO) and i didn't need to disable OVRCameraRig to make it work. Is it a normal behaviour or something in the project is wrong?

    Anyway thank you very much for your reply ;)
     
  4. Evil-Otaku

    Evil-Otaku

    Joined:
    Oct 17, 2012
    Posts:
    79
    The VR Rig should not be part of the network player prefab. Since it is taking the inputs from the headset, multiple rigs will end up copying each other locally.