I can’t seem to get an ofRect to rotate in place in 3D space. It always looks wobbly, as if the entire rectangle is being rotated around something, rather than it be flipped in place. I’ve looked at the following posts but they didn’t help:
http://forum.openframeworks.cc/t/glrotate-a-rectangle-in-place/4813/0
http://forum.openframeworks.cc/t/how-to-rotate-around-center-of-mass/3942/0
http://forum.openframeworks.cc/t/glrotatef-and-transformations/8966/0
Here’s my sample code:
[pre]
cam.begin();
angle++;
if (angle >360) angle = 0;
ofSetRectMode(OF_RECTMODE_CENTER);
ofPushMatrix();
ofRotateY(angle);
ofRect(0,0,500,500);
ofPopMatrix();
cam.end();
[/pre]