Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Third Party [PUN2] Animated bodies in VR multiplayer

Discussion in 'Multiplayer' started by PascalTheDog, Sep 24, 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 intefering 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!