I have just one question to ask , and i hope i can get some replies.
I would like to know how i can set the mass based on object scale .
I have tried to calculate the mass like this:
Code: Select all
btScalar mass = (0.1f + scale.X/2) + (0.1f + scale.Y/2)
+ (0.1f + scale.Z/2);
btVector3 halfExtents( (scale.X + 0.5f) * 0.5f , (scale.Y+ 0.5f) * 0.5f , (scale.Z+ 0.5f) * 0.5f );
btCollisionShape *shape = new btBoxShape(halfExtents);
btVector3 localIner;
shape->calculateLocalInertia(mass, localIner);
But for some reason the objects don't collide with each other....
If anyone could help , it would be really awesome.
Thanks.