Jump to content
  • Advertisement

Archived

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

Floru

rotating obejcet

This topic is 6733 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! I have a problem with rotating object in 3D space. When I try to rotate a object it rotates but at the same time it moves around origo of the hole world. So when the object coordinates are 0,0,0 it just rotates without moving anywhere... I''m trying to make base class for objects which I then could use in subclasses. This base class would handle basic translations and rotations etc. Is there a good example of this kind of class? I''m using DirectX. Floru

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I would recommend first rotate the 3D Model and then translate (offset model in world coordinates). And if the model needs to rotate in the world coordinates do one more rotation.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Me again!

You will have to rotate first, because rotation formulas operate from an origin relative to the model.(usually the center of the model)

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!