Search Unity

Help Wanted [PUN2] Animated bodies in VR multiplayer

Discussion in 'Multiplayer' started by PascalTheDog, Sep 24, 2021.

  1. PascalTheDog

    PascalTheDog

    Joined:
    Mar 16, 2015
    Posts:
    49
    Hey,

    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!
     
unityunity