Page 1 of 1

Simulating a coin with btCylinderShape?

Posted: Tue Mar 24, 2009 10:55 am
by dudler
Hi, I'm trying to simulate a coin with a specific diameter and a relatively small height. As collision shape I use the btCylinderShape and I'm having an issue when the coin is about to rest on a plane but still keeps spinning on its border for a very long time on the same position.

I'm pretty new to physics engines and physics in general so I was wondering if there is a way to sort of damp the spinning if the position itself doesn't change anymore? Or is the btCylinderShape not meant to be used for very flat cylinders like coins? Are there suitable alternatives?

Greetings,
dudler

Re: Simulating a coin with btCylinderShape?

Posted: Tue Mar 24, 2009 2:05 pm
by Dominik
Try increasing the angular damping factor, which is initially set to zero.
set it in the btRigidBodyConstructionInfo or use btRigidBody::setDamping(btScalar lin_damping, btScalar ang_damping)