Multiplayer animation

Hi I am trying to make the bootcamp demo into multiplayer.

I am trying to do the animations over network, but they are not played by amination .play()

They are played this way. I have no idea how to add an rpc call to that. Can someone help me out please.

animation["NormalGroup"].weight  = uprightWeight * nonAimWeight * groundedWeight * nonRelaxedWeight;
        animation["RelaxedGroup"].weight = uprightWeight * nonAimWeight * groundedWeight * relaxedWeight;
        animation["CrouchGroup"].weight  = crouchWeight  * nonAimWeight * groundedWeight;

        animation["NormalAimGroup"].weight = uprightWeight * aimButNotFireWeight * groundedWeight;
        animation["CrouchAimGroup"].weight = crouchWeight  * aimButNotFireWeight * groundedWeight;

        animation["NormalFireGroup"].weight = uprightWeight * fireWeight * groundedWeight;
        animation["CrouchFireGroup"].weight = crouchWeight  * fireWeight * groundedWeight;

        var runningJump = Mathf.Clamp01(Vector3.Dot(motor.movement.velocity, transform.forward) / 2.0);
        animation["StandingJump"].weight = (1 - groundedWeight) * (1 - runningJump);
        animation["RunJump"].weight = (1 - groundedWeight) * runningJump;

What you see is basically the effect of having the ‘weight’ variables assigned each frame. Since all the animations are enabled at the same time, zeroing their weights will allow their crossfading to prevail over the other animations.
I don’t know if this is the best approach to multiplayer animation, but if you want to bring that over network, you surely need to look at RPCing the weight calculations, and passing that to the ‘others’ animation scripts of each client.

I am looking to the BootCamp, but I don’t know where are defined “NormalGroup” , for example. Where did they do?

Thanks

In Locomotion System , of course… :stuck_out_tongue:

I’m sorry jeje…