Jump to content
  • Advertisement

Archived

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

Guest Anonymous Poster

simple very simple question for the smarter people

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

Guest Anonymous Poster
translate the object by (5,1,0),
then rotate

Share this post


Link to post
Share on other sites
Advertisement
Not quite. Rotate it first then translate it. The last case mentioned is only true if your using OpenGL's glRotate and glTranslate functions. But in everything else you always rotate then translate .

--TheGoop

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i think i asked the question wrong.

-----.(0,0,0)-----.(5,0,0)-

i want to rotate it around (5,0,0)
then it would look like

\
\
\. (0,0,0)
\
\
.(5,0,0)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
whooooooooops

' -------.(0,0,0)---------.(5,0,0)
' point a point b
. \
. \
. \. a (?,?,0)
. \
. \
. \
. . point b still (5,0,0)
.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i want to rotate the whole object around point b. if you just rotate the object it would rotate around point a.

Share this post


Link to post
Share on other sites
Actually, TheGoop, I believe in this case you translate first to get the pivot point (5,1,0) on the origin, then you rotate, then translate backwards to place the pivot point back where it was originally.

Or am I just completely wrong?

- Splat

Share this post


Link to post
Share on other sites
You make that point (5,1,0) at (0,0,0)...and then you rotate.

------------------
Dance with me......

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
how would you do that?
but you see i want to rotate it in many different points.

Share this post


Link to post
Share on other sites
this is pretty basic. If you want to rotate an object around any point (x, y, z), first just translate it by (-x, -y, -z), then apply your rotation, and translate it again by (x, y, z) to put it back where it was.

[This message has been edited by Myopic Rhino (edited November 08, 1999).]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
lets say i haaave two points in an object
__________________
¯¯¯¯¯| |¯¯¯¯¯¯¯¯¯¯\\
------------------/¯¯¯¯¯¯\
_________________| . (5,1,0) point W
. (0,0,0) point X\______/

i use d3dim btw..
if i rotate the object it rotaates around (0,0,0)..
but i want the object to rotate around (5,1,0).. how would i go about doing that?
do i translate point X? or rotate the whole object then translate itsomewhere? how?!

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!