KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a problem with this openGL code: glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glPushMatrix(); // put current matrix on stack //glTranslatef(0.0f, 0.0f, 0.0f); //glTranslatef(-4*1.5, 0.0, 4*1.5); glRotatef(rotationAngle, 0.0f, 1.0f, 0.0f); // rotate the robot on its y-axis glTranslatef(xpos, ypos, zpos); DrawRobot(xpos, ypos, zpos); // draw the robot glPopMatrix(); What should I do to make my robot turn around the point at which it is currently situated and not around the origin? I think the problem lies in this snippet.
Tags (comma-separated)
Save Edits
Cancel