Jump to content
  • Advertisement
Sign in to follow this  
cutovoi

Rotation doubts

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

Hi for all I think my doubt was maded by a lot of people(inclusive myself). Unfortunatelly anyone can give me some answer that I can understand. And I'm going crazy with this. My question is simple: I have my 3D space with their (x, y, z) global coordinates. And I have a very simple model that is located in an arbitrary location. When I rotate this model I would like it rotates about itself. What occurs is totally different. This object rotates around the axis of the plane. That means, my object instead to rotate in their local coordinate axis, rotates in the global coordinates axis(plane). What can I do to make my object to rotates in this own axis, or how can I get it's local coordinates. Fellows, thanks for the help provided.

Share this post


Link to post
Share on other sites
Advertisement
You need to apply rotation before translating from local space to world space, that way rotation will be in local space, around the origin of your mesh. You could also change the origin of your mesh by translating to that point in local space, then rotating in local space, then translating into world space.

I hope this answers your question, if I understood you correctly.

Share this post


Link to post
Share on other sites
but how can I get the local coords of my mesh?
I using a square maded in 3DMax. And in the 3DMax plane I put it in a arbitrary place.
The problem is this. I don't understand this:
Quote:

You could also change the origin of your mesh by translating to that point in local space, then rotating in local space, then translating into world space.


how can I translate in local space?

Share this post


Link to post
Share on other sites
AFAIK in 3dsmax all object coordinates are already stored in local space and might be transformed to "world space" at export time.

Translating a point in local space simply means to move the vertices directly, i.e. you instead of a vertex (1, 0, 0) you would store the "translated" vertex(2, 0, 0) if you want to translate by (1, 0, 0).

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.

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!