So i’ve been trying to make the player face towards the direction i pressed. That part works just fine but when I try to move the player it moves diagonally instead of left/right. Any clues?
else if (Input.GetKey(KeyCode.RightArrow))
{
//moves the player
rb2d.velocity = new Vector3(2.5f, 0, 0);
transform.Translate(rb2d.velocity * Time.deltaTime);
//flips the player right
if (human.flipY == true)
{
human.transform.rotation = Quaternion.Euler(0, 0, 270);
}
else
{
transform.rotation = Quaternion.Euler(0, 0, -270);
}