btBoxShape and mesh pivot point question

Post Reply
lucky7456969
Posts: 26
Joined: Thu Sep 11, 2014 5:40 am

btBoxShape and mesh pivot point question

Post by lucky7456969 »

Code: Select all

// pivot point on ground, so wrong
// it is right if pivot point is at center
btBoxShape *shape = new btBoxShape(btVector3(width / 2.0f, height / 2.0f, length / 2.0f));          
How can I make the mesh not falling off when the pivot point of the mesh is on the ground
rather than in the center of the mesh?
If I offset the world transform, the mesh will be raised at the same time.

Update:
I've changed to btGImpactMeshShape, and the mesh doesn't fall off anymore.
But there is transformation fighting, when the "worker" is trying to grab the trolley's handle
the collision of these 2 objects constantly resolving, and making the worker shake in some random manner.
Any quick fix for me?
Thanks
Jack
Post Reply