PDA

View Full Version : Ball Rolling effect



CLoNA
02-20-2003, 10:54 AM
Hi I'm trying to create the effect of a ball rolling. I have textured my ball but cannot make it rotate properly. I know it should rotate around the axis perpendicular to the ball moving direction.

How can I make such a rotation?

Obli
02-20-2003, 11:35 AM
First of all by understanding what is the right perpendicular axis since you got TWO. http://www.opengl.org/discussion_boards/ubb/smile.gif


If you're asking how to put the ball in the correct place and then ROTATE it, i would "concatenate transforms" simply by using glTranslate / glRotate and maybe some matrix push-pop.

Bye