fixed camera issue

This commit is contained in:
2020-02-01 16:24:17 -05:00
parent 87dbaae212
commit 2cbc3e965d
3 changed files with 5 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ public class Player : MonoBehaviour
private void FlipSprite()
{
if (Mathf.Abs(rigidBody.velocity.x) > Mathf.Epsilon && (Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.LeftArrow)))
if (Mathf.Abs(rigidBody.velocity.x) > runErrorThreshold && (Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.LeftArrow)))
{
transform.localScale = new Vector2(Mathf.Sign(rigidBody.velocity.x), 1f);
}