object rotation?
i''ve been using glRotate to rotate objects in my programs. and i was wondering if there is there a way to rotate a specific object while keeping the screen the same instead of rotating the whole screen.
if you know of a way can you please share your knowledge with me.
#include <leet>
glPushMatrix();
glRotatef(WHATEVER,0,1,0);
// draw object here
glPopMatrix();
Doing that will rotate it around your current origin though, if you just want it to spin (like a top) you''d translate to it''s position first.
------------
http://aud.vze.com <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
glRotatef(WHATEVER,0,1,0);
// draw object here
glPopMatrix();
Doing that will rotate it around your current origin though, if you just want it to spin (like a top) you''d translate to it''s position first.
------------
http://aud.vze.com <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
_______________________________________Pixelante Game Studios - Fowl Language
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement