Sign in to follow this  
the dodger uk

rotation of a local vector

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this