Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualDoublefris

Posted 02 April 2013 - 03:39 PM

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 sad.png )

 

thanks in advance! 


#1Doublefris

Posted 02 April 2013 - 03:34 PM

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 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! 


PARTNERS