Videogame Developer

martes, 26 de marzo de 2013

Ragdoll implentation with Bullet

The past week I've been implementing a Ragdoll with our best friend, Bullet :)






The main steps that I've done to implement the ragdoll are these:
  1. Create the rigidbdoes (or Ragdoll bones) and its constraints 
  2. Match the Ragdoll bones to the animation ones
    1. There are two main possibilities here:
      1. Associate one Ragdoll bone to N animation bones
      2. Associate one Ragdoll bone to one Animation bone and the rest can be updated by a hierarchy. ( I used this second way )
  3. Calculate offsets between the Ragdoll and the Animation from the equivalent pose and orientation
    1. The bones from animation and its homologous could have a different starting position and orientation, this difference is what it's called offset and we need to know this to update the animation properly.
  4. Insert the Ragdoll rigidbodies ( bones ) in the physic engine with the right pose, that's to say, initially it's the rigidbodies the ones that need to be setup by the animation pose before being being activated inside the physic engine.
  5. Sync the animation bones from the Physic position and orientation of the rigidbodies.
  6. ( Optional ) I've to start working on this part, recovering animation from a ragdoll pose. I guess that this should be done by implementing a very large blending time, I must try and test it.

No hay comentarios:

Publicar un comentario