Hi guys, since few days i’m making my multiplayer shooter game, and now i have big problem.
When players are connected to serwer they can see how their own character is walking (i mean animations) ,but when other player is walking, he is just playing idle animation.(but is moving)
So have you guys any ideas what to do with this??
There is my player movement script
private var animator: Animator;
var h: float;
var v: float;
function Start () {
animator = GetComponent(Animator);
}
function Update () {
if(networkView.isMine==true)
{
h = Input.GetAxis(‘Horizontal’);
v = Input.GetAxis(‘Vertical’);
if(Input.GetButton(‘kuc’))
animator.SetBool(‘kuc’,true);
else
animator.SetBool(‘kuc’,false);
if(Input.GetButton(“celowanie”))
animator.SetBool(‘celowanie’,true);
else
animator.SetBool(‘celowanie’,false);
}
}
function FixedUpdate(){
animator.SetFloat(‘predkosc’, v);
animator.SetFloat(‘kierunek’, h);
animator.SetFloat(‘bok’, h);
}