Jump to content
  • Advertisement

Archived

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

crossbow

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

This topic is 5888 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
Advertisement
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
I''m not sure how to do that. Can you be more specific? Like how do I rotate a vector around a centerpoint with a quaternion?

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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!