How to bounce the bodies?

Topics: Developer Forum
Oct 28, 2009 at 9:16 AM

I add some balls to the GameScreen. But the default post collision action is do nothing. The balls have no power to reflect along the collision direction.

Is there any way to make the ball bouncing like pinball game?

Oct 28, 2009 at 10:09 AM
Edited Oct 28, 2009 at 10:09 AM

¿The balls collide and stop their motion? Add a higher restitution coefficient to them. Or/and to the colliding object too.

Oct 28, 2009 at 12:45 PM

Problem solved. I set the restitution factor to 0.8F.

I also add one more attribute StaticFriction=0.1F to each body and reduce the velocity each loop. It works like table pinball game.

The engine is great. It seems I don't need study Bullet engine for now. Thanks.

Oct 28, 2009 at 12:51 PM

I found that when I throw a ball to the wall. The ball speed increases each time bouncing the wall. Is there any solution for that? The ball speed should keep decreasing in reality.

Mar 10, 2011 at 9:57 PM

Hi, 

Sorry but have you managed to solve the speed problem?. I need to create something in which bodies have a pretty high restitution but I want them to slow down after a certain point. Also getting the problem in which the bouncing ball might be bouncing from left to right many times and never goes down (or up), does this have to do with the friction of the bodies?