Hi, I'm having trouble making a turret aim turn the shortest direction.
I can make it aim at the right angle, but sometimes, it takes the longest angular route. I work in radians (from 0 to 6.27 rads [6.28 goes back to 0]) , and I have 2 points I give my turret; the original angle and the target angle.
The turret starts by aiming due Right (0 Rad), but keeps its position from the previous firing step.
Essentially, I want it do the what the Bertha does.
http://knucklecracker.com/wiki/doku.php?id=crpl:docs:shortestangle
Well that works... And it's a little humiliating. I've been working on this for over 2 hours. Although, I think I figured the long way to do it too :)
On the bright side... it's a problem that presents itself often enough to warrant the solution be handed to you in this way. :)
It must be :)