Collisions not working in Animation

Hello

I’ve created a NPC demon and imported it from cinema 4D which has a animation controller with currently 2 states: Walk, Die. The “die” animation gets set when the NPC’s health is >= 0. When he dies he falls onto the ground and stays there.

Now my problem is that when I imported my mesh, I checked the box generate collisions but I could walk right trough it. When I add a capsule collision this problem is solved. Now I got a bow and arrows, and when I shoot the arrows at the NPC, they get stuck inside the collisions, but when he dies, the capsule colission stays vertical and doesn’t move to the dead body, this causes the arrows stuck in the npc (walk animation) body to still float around when the NPC is laying on the ground.

Can I somehow, generate collisions which will follow the animation, no matter what kind of animation is played?

Screenshot:

alt text

First of all you cannot generate mesh colliders for a moving object. The capsule collider is the way to go.

If you are moving the object around (a car for example), you can not use Mesh colliders. Instead, you will have to use Primitive colliders. In this case you should disable the Generate Colliders setting.

From http://docs.unity3d.com/Documentation/Components/class-Mesh.html

Next, you might try attaching the capsule collider to a bone in your mesh, so that it will follow the animation.

(Suggested here.)