I have problem with bullet collisions. You can see problem on this video (around 0:18):
Objects are "embeded" inside vertical bars - that is not correct - they should be bouncing like at the beggining of the video. I am using sphere and box as bullet bodies. I have also enabled CCD, that improves stability a little, but problem is still there.
Pulsing bars are controlled with this code:
dist = distance I need the bar to change its position in a single frame float g = (2 * dist) / (times.dTime); //dTime = 1/60 bars[i]->GetBulletBody()->setLinearVelocity(btVector3(0, 0, 0)); bars[i]->GetBulletBody()->setGravity(btVector3(0, speedUpFactor * g, 0));
I have constant update rate of physics and world, set to be 1/60 s.