Turns out I needed to check it against velocity, answer below:
// Use this for initialization
void Start ()
{
waypoints = GameObject.Find("Waypoints").transform;
someScale = transform.localScale.x;
}
// Update is called once per frame
void Update ()
{
if (rigidbody2D.velocity.x >= 0)
{
transform.localScale = new Vector2(someScale, transform.localScale.y);
}
else
{
transform.localScale = new Vector2(-someScale, transform.localScale.y);
}
}
↧