Energy-conserving collisions? [RESOLVED]

WittyUserName
Posts: 4
Joined: Sun Feb 07, 2010 3:24 pm

Energy-conserving collisions? [RESOLVED]

Post by WittyUserName »

(Please read my reply below--the problem I describe isn't a problem in Bullet at all.)

Hi all,

I was attempting to use Bullet to simulate a number of spheres interacting with each other and some static objects, and some of the interactions didn't look quite right. So I tried out a simple test with a moving sphere colliding head-on with a stationary one, and no matter what values I choose for friction/restitution, the collision is very inelastic--after the collision, both spheres are moving at roughly half the velocity of the original moving sphere. Momentum is conserved, but kinetic energy is not (with at least ~40% of the energy being lost on each collision).

Is there any way to enforce conservation of energy by setting some option(s) in Bullet, or am I going to have to use a callback or something to intervene on each collision and doctor up the velocities?

Thanks!
Last edited by WittyUserName on Sun Mar 14, 2010 4:48 am, edited 2 times in total.
WittyUserName
Posts: 4
Joined: Sun Feb 07, 2010 3:24 pm

Re: Energy-conserving collisions?

Post by WittyUserName »

I just wanted to reply to myself so that I don't leave anyone with the impression that Bullet doesn't do energy conservation; it does, and the mistake was mine: I was using Bullet from within a client's framework, and it turns out that the restitution parameter I was passing in to a proxy object wasn't properly passing it along to Bullet, causing the simulations to always behave the same. Once I fixed the framework problem, Bullet behaved as expected.