btSphereShape friction

Post Reply
radubolovan
Posts: 7
Joined: Mon Dec 22, 2008 3:13 pm

btSphereShape friction

Post by radubolovan »

Hello.

I was making a huge btRigidBody that uses btBoxShape as ground and I have a cannon which fires spherical (using btSphereShape) bodies. Everything works fine, except after cannon balls hit the ground, they don't stop as expected (after awhile). As they don't use friction with the ground at all. They keep rolling and rolling until ... forever.

What should I do to make them work properly?

Thanks in advance.
Adriano
Posts: 6
Joined: Fri Mar 08, 2013 9:53 am

Re: btSphereShape friction

Post by Adriano »

You can try to add a damping:

ball->applyDamping(btScalar(0.8));
after the collision.

or

ball->setDamping(btScalar(0.0), btScalar(1.0));
when you create the body.
radubolovan
Posts: 7
Joined: Mon Dec 22, 2008 3:13 pm

Re: btSphereShape friction

Post by radubolovan »

Thank you Adriano for your reply.

I was solving this following RollingFrictionDemo sample though, using setFriction & setRollingFriction to btRigidBody objects. :)
Post Reply