- Home /
Question by
sspencer442 · Apr 02, 2017 at 10:00 AM ·
networkingspriteclientflip
Fliping 2Dsprite over network,fliping 2Dsprite from client to server not updating
Can anybody tell me why my client does not update the localscale on the server here is my code:
[SyncVar(hook = "OnChangedDirection")]
public Direction direct;
void Movement()
{
if (input.Horizontal == 1)
{
direct = Direction.right;
if(isLocalPlayer)
CmdFlipSprite (direct);
}
if (input.Horizontal == -1)
{
direct = Direction.left;
if(isLocalPlayer)
CmdFlipSprite (direct);
}
void Update()
{
if (!isLocalPlayer)
return;
AttackSounds();
OrientDirection();
//OnGroundCheck();
Movement();
UpdateAnimator();
Damaged = false;
if (input.Block == false)
{
Nullify = false;
}
}
Comment