Archived

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

Blza

Rotations

Recommended Posts

Blza    122
Hello.... a fast question to ya ... how can i rotate o object like a cube for example around your own axis ??? coz its spinning around invisible thing.. i really dont know how i can do that ... thanx and byby

Share this post


Link to post
Share on other sites
richardve    122
Ever tried to glTranslatef() the box?
If you do this after the rotatation(s) the box doesn''t turn around his own axis anymore...

Share this post


Link to post
Share on other sites
Blza    122
Hehe, well...

when i rotate a cube, for example and he is distant of origin.
he doesn''t rotated in own axis. he rotated like a carrousel...

understood ???

really sorry about my poor english...

i think the best way to do a fixed rotation is using push and popping the matrix but i''m not so sure...

thanx anyway...

[]''s

Share this post


Link to post
Share on other sites
max621    139
What you gotta do in your case is to translate first and than rotate, I think.
I''ve been having troubles making a quad rotate around its own axis, and than move in the direction its pointing. I think I need to use vectors and rotate them..

Share this post


Link to post
Share on other sites