- Home /
Locomotion multiplayer
There are several question about this topic, but no tutorial or usable answer...
the animations don't work properlly if playing multiplayer mode?? I took a look into the bootcamp multiplayer demo, but with no luck... it's the same problem as this post http://answers.unity3d.com/questions/33446/locomotion-system-in-multiplayer.html#answer-154545
it has glitches when the players are moving.... :(
Answer by roamcel · Aug 09, 2011 at 10:16 AM
Well, to put it simply, there's no easy answer. The -only- way you'll get to understand how to implement multiplayer animations is
1- download unity's networking demo
2- access the separate examples and notice that -all- objects that need multiplayer synchronization have one 'networkView' item attached to them (you find it in component=> miscellaneous=> network view)
3- notice how you use the
networkView.RPC
to execute functions on server, others or all multiplayer objects on the scene.
Consider that these stupid few tips have just saved you one good day of googling around.
What you're witnessing is a consequence of the 'network tick rate'. In simple words, the frequency at which packets are sent over the net. Since this is an expected behavior, you will need to integrate your gameobjects with an interpolation routine. The networking demo has such a routine both for transforms and animations. Check out the third person scene in particular.
Oh by the way you can influence the network tick rate in EDIT=>PROJECT SETTINGS=>NETWOR$$anonymous$$=>SEND RATE
Answer by slatius · Aug 26, 2011 at 10:13 PM
ok this is how solved this problem...just make the network view observe the NetworkInterpolatedTransform component
function Awake () {
var i : NetworkView;
i = this.gameObject.GetComponent(NetworkView);
i.observed = this.gameObject.GetComponent("NetworkInterpolatedTransform");
}
THERE IS a easy answer!! but thanks anyway... hope it was helpful, if you need more info e mail me. hugs and kisses xD