How to make an object more bouncy.

vidjogamer
Posts: 13
Joined: Thu Apr 29, 2010 11:59 pm

How to make an object more bouncy.

Post by vidjogamer »

Hello, I have just started using Bullet and I am going through some tutorials.
I can not seem to figure out how to make objects bounce however. Could Someone please point me in the right direction? Links to decent tutorials would be much appreciated as well. Thanks!
User avatar
jarno
Posts: 57
Joined: Tue Mar 16, 2010 1:42 am

Re: How to make an object more bouncy.

Post by jarno »

You can make collision objects more bouncy by increasing their restitution value. Either with btCollisionObject::setRestitution() or by setting m_resitution in btRigidBody::btRigidBodyConstructionInfo when creating a rigid body.

The default value is 0. Setting it to 1 makes objects very bouncy. You probably want a value somewhere in between.

---JvdL---
vidjogamer
Posts: 13
Joined: Thu Apr 29, 2010 11:59 pm

Re: How to make an object more bouncy.

Post by vidjogamer »

thanks jarno! that helps a lot. =)