Ball into hole physics
Posted: Mon Nov 16, 2009 1:20 pm
I am a total noob at this so please bare with me. I have a ball that is rolling around on a surface that has holes in it. I've figured out all the calls and modifications to get the ball to roll as a function of the gravity vector which is close to perpendicular to the surface ( this is an iPhone app so the accelerometer is used to adjust the gravity vector per the tilt of the "surface". I am trying to figure out a way to make the ball behave very life like when the ball reaches the edge of the hole. The physics should be life like enough so that if the ball "lips" the hole, the ball will change its vector (dependent on gravity vector and ball velocity). If the ball gets close enough to the center of the hole I need to change it so that the ball image gets smaller as it "disappears" down the hole.
Any help, suggested reading materials, code examples, or tutorials would be greatly appreciated.
Thanks in advance.
Any help, suggested reading materials, code examples, or tutorials would be greatly appreciated.
Thanks in advance.