Good Evening,
I’m working on a 2.5D twin shooter space project.
This is how I’m currently handling Movement:
And this is how my AI determines where or not to turn left, or right, to reach the target vector, in this case, a white sphere:
The issue is that the ship will always face the target, however, it will not account for drift when turning and thrusting at the same time, which results in large orbits around the target, instead of reaching the target. I did my best to capture that in this gif with my limited 7 seconds:
You can kinda see how it’s orbiting, facing the target directly, but not turning additionally to stop the lateral drift.
I’ve no clue how to fix this. I know something along the lines of getting my velocity normal, as well as the rotation needed to look directly at my target, then somehow use both of those to over overcompensate on the turning, until it evens itself out, but I don’t know how I would achieve that, or if I’m even on the right track. I would prefer to keep the changes inside the Get Turn Direction function, so that I can reuse that multiple places, but I’m open to any suggestions.
Thanks!

