I'm designing a behavior that will make a gun turret rotate to face the player, by rotating at a set speed rather than instantly putting itself on target. I do this by telling it: "If player position in degrees is less than direction of self, rotate counterclockwise. If it's greater, rotate clockwise."
It's working well, with one exception which you might have already predicted: when the player crosses the 360/0 degree threshold, the turret has to rotate all the way around the wrong way. How can I make the turret continue to follow the player in the same direction? I can post the behavior if it would help. Thanks very much for any advice!