Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question [PUN2] Animated bodies in VR multiplayer

Discussion in 'VR' started by PascalTheDog, Sep 25, 2021.

  1. PascalTheDog


    Mar 16, 2015

    I have successfully created an animated model in VR using Valem's tutorial. Basically, the XR Rig from the XR Toolkit drives the position of constraints that instruct the model's bones to move around. Straightforward enough. Works like a charm... in solo.

    The challenge, now, is to have those animation work properly in multiplayer, using Photon PUN2. And that's when I'm kinda stumped: I can't get the hands to behave like I want them to. Whatever I do, I always end up with either the hands not responding or interfering with that of the other player.

    See, whenever I'd need to restrict input to the local player in non-VR multiplayer, I would just disable the relevant MonoBehaviours (such as the one handling movement) — but I'm not sure how to reliably achieve something similar with that new VR multiplayer setup, because of all the bits and pieces involved. The fact that I need to push builds into the headsets and juggle between them every time I want to give it a try doesn't help.

    Assistance would be much appreciated. Cheers!