I've some problems with rotation..when I load an obj object in my opengl api application, the object changes its pivot point due to unitize function,I guess. So when I rotate it, it moves by a global rotation and loses its original pivot point. How can i do? thanks!
Overmind
12-18-2004, 05:12 AM
First translate the pivot point to the origin, then rotate and translate the pivot point back to where it should be.
If your Pivot point is (x,y,z), you do the following:
glTranslatef(x, y, z);
glRotatef(...);
glTranslatef(-x, -y, -z);
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.