Bullet Physics with Animations

Post Reply
mathew11
Posts: 4
Joined: Tue Jun 16, 2015 5:09 pm

Bullet Physics with Animations

Post by mathew11 »

Hi,

I'm asking myself, how to import animations (keyframes) to bullet, especially how to enable the forces, instead of, just transforming the object.

Actually, now I'm calculating the new modelMatrix out of the keyframes and then I'm setting the WorldTransform of the body each frame. The animation works, but it's hard to interact with that object. I have a character object, which is moved only with forces.
The problem is when I jump on the animated plattform it doesn't synchronize the force with the character object, because there is no force, which can actually move the character object.

My questions is --> What are the best approaches to import keyframe animations with bullet?

Best regards,
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Bullet Physics with Animations

Post by drleviathan »

Try giving the keyframed platform a velocity value that agrees with its motion. The velocity won't actually move the platform (it is moved via the keyframed animation of course), but it will make objects that collide with it respond as it if were moving.
Post Reply