Mecanim Syncing with Multiple Layers

Options
I currently have a game which I would love to convert to multiplayer, but I'm having an issue getting the animations to sync, as in the Mecanim Demo. My issue is I have two layers for animations, one is the general movement, the other is a mask for the arms. Is there a guide I may be missing to link up the PhotonAnimatorView to work with the layer mask?

I can currently set the base layer to sync, but then I lose the mask animations, which obviously is not desirable. I'm hoping there is something I'm missing here!

Comments

  • jeanfabre
    Options
    Hi,

    uhm, could you share your animator system? It will be easier if I can reproduce something, then I can likely fix it or find exactly what's wrong.

    Are you using triggers?

    Bye,

    Jean
  • taleri
    Options
    Hey,

    Here's the animation system, please let me know if for whatever reason the entire thing was not packaged up.

    https://drive.google.com/file/d/0B4MSOxOOA4MnZmRET3FBdjlHSnM/view?usp=sharing

    Thanks,
    Ralph
  • jeanfabre
    Options
    Hi,

    yep, it seems to be that you are using mainly triggers.

    what is likely happening is that you need to have a very specific order. Please read this:

    https://doc.photonengine.com/en-us/pun/current/manuals-and-demos/animatorviewtriggerhelp

    and so you need to make sure that PhotonAnimatorView (PAV) is after your behavior that actually raise triggers, else they will simply be skipped, because raising a trigger only last for the remaining duration of the frame, if PAV is not checking during the remaining frame duration, it's lost.

    A good way to make sure works is to use the simpler animator from the basic tutorial, which has exactly this problem, and Unity seems to have trouble with this, so you need to shake the prefab order of components to get the jumping to work. First verify you see the issue that jump is not synchronized over the network, then remove PAV, add it again and plug things back with the PhotonView and test again, until you get it to synch, then this is what you need to do in your own prefabs.

    If you are still struggling with this let me know. I haven't found yet a definite way to get rid of this issue, unless buffering triggers to be available throughout the entire next frame. So maybe we could explore this together if you can't get it to work.

    Bye,

    Jean