- Home /
unity network animation problem
hi guys me again haha
i got another question i got my animations over the network but its just when i walk ( first player in the game ) then all the animations of all the other players play
and then when i move other players nothing happens ( i use syenc animation )
here is some part of the code
function Start(){
animation.wrapMode = WrapMode.Loop;
animation["walk-soldier"].wrapMode = WrapMode.Clamp;
animation["idle-soldier"].layer = -2;
animation["walk-soldier"].layer = -2;
//animation["excited"].layer = -1; animation["look"].layer = -1; animation["think"].layer = -1;
animation.Stop();
}
function Update () {
if(networkView.isMine == true)
{
if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.0) {
animation.wrapMode = WrapMode.Loop;
animation.CrossFade("walk-soldier");
SendMessage("SyncAnimation", "walk");
}
else{
animation.Play("idle-soldier");
animation.CrossFade("idle-soldier");
SendMessage("SyncAnimation", "idle");
}
}
else{
return;
}
}
for the rest i use the syenc animation from the network tutorial
i hope you guys(and girls) cant help me
thanks in advanced
may be you should add more details on how the code iz working..than may be some one can help..following is just crap data..can u be more open
Please properly space and indent your code, people are way more willing to give answers if reading code is made easier :)
Your answer
Follow this Question
Related Questions
Make an animation play over RPC call? 1 Answer
play animations (multiplayer) 1 Answer
Problem with animation RPC in Photon 1 Answer
Change networkView owner not working 1 Answer
Spawning Clients 1 Answer