Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

HellStorm

rotation matrix

This topic is 6916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

K, this isn''t exactly what the topic says, I am working on a space sim(full 3d) and had no trouble getting my camera matrices working. My problem is I need the enemy ships to be able to turn and look at whatever ship is targeted. All I know for sure(well maybe) is that I start out doing this: blah = targetposition - currentposition; To restate the question I need to know how to construct a rotation matrix based on a ships current location and a target. Psuedo code would be a major help. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Ok you could try at www.flipcode.com
under
Development Tutorials
under
Features

and do a search for ''wwh''
you''ll get a list of documents just scrole down to
''WWH - Calculating A Rotation Matrix Based On Location/Target by Paul Nettle''

here is a direct link to the doc.
http://www.flipcode.com/documents/wwh5.txt

that should be what your looking for.
-Delvar

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!