#### Archived

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

# simple very simple question for the smarter people

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

## Recommended Posts

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

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

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

##### Share on other sites
i want to rotate the whole object around point b. if you just rotate the object it would rotate around point a.

##### 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 on other sites
You make that point (5,1,0) at (0,0,0)...and then you rotate.

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

##### Share on other sites
how would you do that?
but you see i want to rotate it in many different points.

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

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 9
• 13
• 84
• 11
• 10
• ### Forum Statistics

• Total Topics
632969
• Total Posts
3009597
• ### Who's Online (See full list)

There are no registered users currently online

×