Uncontrollable spinning

jb485
Posts: 2
Joined: Tue Mar 29, 2011 9:53 pm

Uncontrollable spinning

Post by jb485 »

Hi, I've attempted to make a simple testing environment for bullet with a few simple cubes (btRigidBody with btBoxShape) floating around in a box (made up of 6 * btStaticPlaneShape). However, whenever a cube touches the side of the box (or any other cube) it starts to immediately spin very fast and never loses energy. I experimented by setting restitution to zero and although that makes it slightly less bouncy, the mad spinning is still there. Any ideas?

EDIT: this doesn't seem to happen if I use btBoxShape for the walls instead of btStaticPlaneShape.
ciphr
Posts: 15
Joined: Mon Mar 28, 2011 9:11 am

Re: Uncontrollable spinning

Post by ciphr »

jb485, make sure that rigidbody in not bigger than the box. I suppore, that planes are bad choice, because they're infinite :)
Boxshape should be fine, if you need exactly box shape.
Consider also trimesh with normals inwards.