GImpact bodies having no angular velocity

Bbilz
Posts: 26
Joined: Wed Feb 27, 2008 9:55 am

GImpact bodies having no angular velocity

Post by Bbilz »

Hi,

I am attempting to get a dynamic torus working in my Bullet code. I have used btGImpactMeshShape, and the mesh data from the GImpact example.
As far as I can see I have everything initialised the same as in the GImpact example.

The torus moves and collides properly with everything, except that it seems to have no angular factor. It will stay rigidly upright, and not topple or display any kind of angular movement. In every other respect it seems to be working.
I have checked really obvious things such as the angular factor, but that is consistantly 1..

Is there anything I have missed that would cause such a thing to happen?

Thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: GImpact bodies having no angular velocity

Post by Erwin Coumans »

Are you initializing the inertia tensor, with non-zero mass?

Code: Select all

	btVector3 localInertia(0,0,0);
	if (isDynamic)
		shape->calculateLocalInertia(mass,localInertia);
Hope this helps,
Erwin