Jump to content
  • Advertisement


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


Rotation problem (trig)...

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

Okay, I''ve got my rotations all wrong (no, not OpenGL rotations, but the trig). It works in 2D, but I''m having trouble working in the third dimension correctly. If someone could please explain this before I leave for vacation at 8AM (Eastern US) that would be great. Okay, here''s something for you to start with: Lets say I have a point and a line segment. The line segment stays the samle length, ALWAYS, and I want to rotate the line segment around the point using a GLfloat rotation[3] (rotation[0] being rotation around the x-axis, rotation[1] being rotation around the z-axis, etc). Got it? I want simple code to do this (for this example let''s pretend the point we''re rotation around is the origin of (0, 0, 0), so you don''t even need to bother with translations. Please, I need this before I leave (no net access for 5 days... Ahhhhhhh! I guess that''s supposed to be relaxing. I''de rather be coding). Thanks for any help. Morgan

Share this post

Link to post
Share on other sites
Sorry for not replying in time....

How do you rotate around a point in 3D space? You should rotate around an axis!

Visit our homepage: www.rarebyte.de.st


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!