For my program, it must have the capability to move an entire character model to some default position before an animation is played. It does this by just updating the bone matrices, which works perfectly fine.
How would I tell Bullet to move the rigid bodies to the new positions of the bones that they are attached to? I have a transform representing the body's transform relative to the bone, and the bone's current world transform. I'm assuming it would just be bodyTrans*boneTrans and just call setWorldTransform() on the current rigid body with that value?
EDIT: I now have it set to grab the bone's world transform, multiply it by the body's offset transform, call setWorldTransform() on the body with that value, then call btDiscreteDynamicsWorld->UpdateSingleAabb() with the current body. It still does not seem to be working. Other bodies in the world do not seem to notice that the body was moved, and behave as if it were never moved.
Repositioning the rigid bodies when a bone moves
-
- Posts: 5
- Joined: Sat Jul 21, 2012 2:48 pm