PDA

View Full Version : Hand waving



skiing
02-11-2009, 05:45 PM
I am very new to open GL and I am trying to figure out how to make a hand I drew using open GL wave, I have very little to go on from the profesor and I have used google with very little success. I would really appreciate someone sending me in the right direction.

dorbie
02-11-2009, 08:27 PM
hand_angle = wave_size * sinf(elapsed_time * speed_factor);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslate(-elbow_pos.x, -elbow_pos.y, -elbow_pos.z);
glRotatef(hand_angle, 0.0f, 0.0f, 1.0f);
glTranslate(elbow_pos.x, elbow_pos.y, elbow_pos.z);
draw_arm_and_hand();
glPopMatrix();