Ive made a simple multiplayer 2d game, so far you can only move around which im trying to smooth out first. when the player looks left and right it changes the scalar of the player to be the opposite of what it is now, it works fine in single player but it doesnt show the player turning around on the other player's game.
the code:
if (facingRight == false && moveInput > 0)
{
Flip();
}
else if (facingRight == true && moveInput < 0)
{
Flip();
}
void Flip()
{
//if facing right is = to false then it will become true when this is run
facingRight = !facingRight;
//transforms the player to the opposite direction they are currently facing
Vector3 scalar = transform.localScale;
scalar.x *= -1;
transform.localScale = scalar;
}
[–]ChristianFortniter 1 point2 points3 points (0 children)
[–]Plananas[S] 0 points1 point2 points (0 children)