- Home /
How to work out dogfight rotations for AI
Hi, I am sorry if this has been covered before, but I couldn't find anything that quite covered this... Basically I have been giving myself a total headache for the last two days trying to figure out how to get my AI pilots to know which way to roll the ship prior to either a pitch or a yaw. I have used quaternions and vectors for a good few things before, but this one is really stumping me!
I'm gonna start with just getting the AI to roll untill the target is directly above it's transform.forward, cos once I've got that, I'm sure I can figure the rest out, but I can't even think where to begin on that. I'm measuring the difference between target.transform.position and this.transform.position to find the target angle. I can then use transform.forward to find the local forward angle. I can also use transform.up to find the local upward angle, but then compiling all this into something that tells the AI how to rotate is totally escaping me! Am I being simple? I feel I must of been overlooking something really easy.
Cheers in advance for your help!
Pete
Your answer
Follow this Question
Related Questions
Flip over an object (smooth transition) 3 Answers
Distribute terrain in zones 3 Answers
Script is Flipping Out! 2 Answers
Adjust Yaw For A Gliding (Like Superman 64) Script 1 Answer
NavMeshAgent resume original position and facing direction C# 0 Answers