Search Unity

SteamVR and CameraRig with Netcode and Photon Realtime Transport

Discussion in 'Netcode for GameObjects' started by Eros96, Mar 24, 2022.

  1. Eros96

    Eros96

    Joined:
    Sep 26, 2019
    Posts:
    30
    Hi, I am new to multiplayer and trying to use it for virtual reality, I have the following setup:
    2 Pcs: one uses HTC vive pro connected as a host, the other uses Oculus Rift connected as a client using the NetworkManager and the Photon Realtime Transport. I am using the ClientNetworkTransform to sync the Controller (Right), Controller (Left) and the Camera. Also on the the CameraRig i added the NetworkObject component.
    The weird behaviour is that when i go in PlayMode, from the scene view i can see the cameraRigs (with the camera and controllers) moving in the correct way on both Pcs when moving the associated Head-Mounted-Display, but when i put one of the HMD on, i can just see myself moving and not the one from the other computer. Anyone know what is going on there?

    Thanks for your help!
     
  2. wechat_os_Qy04TeP5qOF1dC9xjKygG7XTU

    wechat_os_Qy04TeP5qOF1dC9xjKygG7XTU

    Joined:
    Mar 20, 2022
    Posts:
    3
    yes,you are right!!
    I change the order like that,it is ok! thanks~
    GameObject pai = Instantiate(mjList[paiID]);

    pai.AddComponent<NetworkTransform>();
    pai.AddComponent<NetworkObject>().Spawn();