I'm attempting to simulate a "ricochet" effect for the bullets I fire from my gun, but can't seem to get them to behave as intended. Basically, the bullets are rigid bodies with a box shape and the following values:
float bulletPower = 100.0f;
glm::vec3 bulletVelocity = cameraDirection * bulletPower;
bulletRigidBody->setLinearVelocity(btVector3(bulletVelocity.x, bulletVelocity.y, bulletVelocity.z));
// And the floor/walls have restitution of 0.9
However, the bullets fly into the scene, bounce quite a bit the first time, then when they hit another surface they stop almost dead in their tracks.
How can I achieve a ricochet effect, where the bullets bounce off of surfaces multiple times and slowly lose their velocity, rather than after about one bounce?