- Home /
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;
where are uprightWeight, fireWeight, groundedWeight and nonRelaxedWeight assigned values?
Answer by roamcel · Aug 04, 2011 at 07:18 AM
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.
Answer by Ailos · Nov 28, 2011 at 10:19 PM
I am looking to the BootCamp, but I don't know where are defined "NormalGroup" , for example. Where did they do?
Thanks
Answer by Ailos · Nov 28, 2011 at 10:19 PM
In Locomotion System , of course.... :P
I'm sorry jeje...
Your answer
Follow this Question
Related Questions
Networking Animation problem 1 Answer
Network animations 2 Answers
Photon: Trembling Player 1 Answer
OnSerializeNetworkView Sync problem 2 Answers
Can the animation editor create local rotational data? 3 Answers