I have a cannon sprite that is set to rotate towards the mouse position.
Every Tick-> Cannon.Set Angle -> Mouse.X & Mouse.Y
This works great the cannon sprite rotates around following the mouse.
I want it to only rotate between certain angles though. I don't want it to be able to rotate straight up, down, or behind.
So I add a condition that it only rotate when the cannon is between two angles (X&Y).
This brings the problem that when it reaches either X or Y it stop following the mouse all together.
Any ideas on how to remedy this?