Archived

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

How do you find a vertecies new pos after you rotate an object

This topic is 5578 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

I am making a space sim game, and I have a little torpedo firing routine, but I need to be able to fire the torpedo from the correct spot on the ship, which is at the front of it. I have a ship model and everything, and the torpedo function works, but how do I find where to set the starting position of the torpedo when I fire it? I use quaternions for all my rotations, and I have the view vector and axis vectors.

Share this post


Link to post
Share on other sites
look at the model without transformations and see where the torpedo comes out...record this position and call it v. when you rotate the object using some quarternion q , also rotate vector v using q. Same thing for any translations etc. that you might do.

Share this post


Link to post
Share on other sites
There are any number of tutorials on object rotations, including several on this site. Please look through the Articles & Resources link (at the top of this page). You may find something useful there.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites