Hello fellows of gamedev.net. I've been struggling with a bit of a problem on my AI.
Me and a friend are working on a space game. Our use-case is a basic kind of AI that will stop and turn to the player when the player comes near.
The problem as follows:
How do I find the (target) angular velocity that will rotate a ship towards a given point?
The knee-jerk solution would be to create a look-at rotation matrix, but this isn't an option. The ship must be rotated indirectly by changing it's target velocity.
I have looked in the book "Artificial Intelligence for Games, Second Edition", from page 180 and on, however this example use quaternions, not matrices like we do.
I guess the basic idea would be to align the ships z-axis with the vector between the two ships, however I don't know how to achieve this( my math skills are lacking )
thanks in advance!
Edited by Doublefris, 02 April 2013 - 03:39 PM.