Jump to content
  • Advertisement
Sign in to follow this  
the dodger uk

rotation of a local vector

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

trying to work this out if you have a box , that has 4 corners at vectors -2,5 2,5 -2,5 2,-5 these positions are local to the center of the box/model. if the box/model is rotated , by a number i can get the matrices of the rotation ect , but how do i calculate the 4 corners relitilve to the world?

Share this post


Link to post
Share on other sites
Advertisement
Your corner points are in local coordinates relative to the box center? Then apply the rotation matrix to the four corner points and add the box's world position to the four points.

Share this post


Link to post
Share on other sites
Quote:
Original post by Waterwalker
Your corner points are in local coordinates relative to the box center? Then apply the rotation matrix to the four corner points and add the box's world position to the four points.



i kind of understand that , could you point me to the correct tutorail for this please, or overview please

Share this post


Link to post
Share on other sites
The center of your box is at


The local coordinate of one of the corners is


The world coordinate of this corner is


To rotate the corner around the center of the box, apply the rotation matrix to the local coordinates



The new world space coordinate is

Share this post


Link to post
Share on other sites
Quote:
Original post by Eric_Brown
The center of your box is at


The local coordinate of one of the corners is


The world coordinate of this corner is


To rotate the corner around the center of the box, apply the rotation matrix to the local coordinates



The new world space coordinate is




Thank you , this i understand perfectly :) cheers

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!