|Topic was automatically imported from the old Question2Answer platform.
I have a player and a gun. The gun points to where the mouse is, while it stays in place, rotating around the player.
But the problem I am facing is trying to flip the gun’s sprite when it reaches the player’s left side. Since I made the sprite pointing to the right, when pointing left, it is upside down. It would be as simple as getting the angle at which the sprite is rotated, and checking if it’s between 90 and 270 degrees, but I just can’t find a function like that.