Bouncing Ball and Reflection

Adrick
Posts: 5
Joined: Fri Jul 22, 2011 7:53 am

Bouncing Ball and Reflection

Post by Adrick »

I've been using Bullet Physics Engine for a project involving a Bouncing Ball and have some problems i'd like to iron out. One of the major ones is reflection.

What I find is when applyiny a central impulse to launch the ball in a particular direction (with gravity) the ball seems to bounce off walls at unexpected angles, that is the angle of reflection is sometimes negative (i.e. it bounces backwards) in the direction the impulse occurred.

I'm using Sphere shape for the ball and static boxes for the walls (1 unit in size stacked on each other). This brings me to the other problem i've been having and that is when stacking boxes like these 1 unit in size positioned along the x axis and I have the ball roll over them it seems to bounce up every time it rolls over the boxes (the seam between each box). What ways can I resolve these issues?

Another thing I would like to implement is been able to control the angle of reflection when the ball hits the wall/box, but I can't see any way to do that, I've checked under the call backs, the tick callback happens after collisions are processed and the contactadded but can't seem to figure it out.

Any help appreciated.