# Rotation doubts

This topic is 3873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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.

##### 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 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).

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634099
• Total Posts
3015526
×