Menyueru wrote:First of I'm not sure how to use Bepu with an humanoid model, i was thinking of using a sphere for the head and different boxes for the rest of the body and just keep them together with some joints, What do you guys think or should i try another approach? if so please elaborate.
If you're thinking about how to handle FPS-style character movement, generally you should just use something like the CharacterController. The shape itself is just a cylinder, but it supports running around, jumping, stepping, and the rest.
If you're asking about how to handle a ragdoll, then yes, a combination of entities connected by joints would be what you want. Examples can be found in the
RagdollDemo and in the
BEPUphysicsDemos source. You'll need to create a mapping from the graphical model bones to the ragdoll entities so that, when the character dies, you can position and orient the entity bones according to the current animation state. The ragdoll entities do not need to be in the simulation all the time- just when animations are not active.
If you're asking about how to handle hit detection when the character gets shot, something like the ragdoll entities could be used. However, rather than being simulated, the entities are just being teleported to exactly match the graphical animation. Further, you don't want these entities to collide with anything, since the CharacterController is presumably still active and handling environmental collisions. So, you'd disable their collision using
collision rules. You can then perform ray casts or other queries to determine intersections with the shapes. Depending on the type of queries you want, these hit detection shapes don't even have to be BEPUphysicsEntities; simple bounding volumes may be sufficient.
And kavatortank covered the rest of it
