骨骼动画与物理系统 老外讨论

cocoBavan is right. When we change from animation to ragdoll we just add the physics bodies to chipmunk and stop setting the positions our self. The details are more complex, but more or less this is what we are doing. We can also mix aniamtion and ragdoll for a single zombie. e.g one arm can dangle (being controlled by physics) while we are playing a walk animation.

Start with a simple bone animation system. When setting positions also update the physics (but do not let physics control the body part). When you want to switch to ragdoll mode, just stop your bone animation and add shapes and bodies to the physics space.

Most work will be to implement the bone animation system, but you can find hints with google. Search for skeletal animation. Creating animations will be another bigger task as finding a good software for this is very hard and in the end you may end up in writing you own editor as there are no good solutions out there for 2D animations. There is plenty 3D stuff out there and it should be possible to use them.



http://code.google.com/p/box2d-editor/

你可能感兴趣的:(骨骼动画与物理系统 老外讨论)