2D Image Flips When Moving Up and Down

Is there a way to write the code so the image can stay flipped the last direction it was facing (left or right)?
The code right now is
direction.x < 0.f ? rightLeft = -1 : rightLeft = 1;
I’m not sure how I’d go about writing the next part to make the direction facing left stay if its moving up and down.
Any help please?

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms