fixed camera issue

This commit is contained in:
Giovani
2020-02-01 16:24:17 -05:00
parent 1e05c787ac
commit e8638b21d1
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);
}