Ragdoll

So I have a “Enemy” and a “Player” and when the enemy dies I want the player to still be able to interact with the enemies dead body like in the souls game. How would I go about doing something like that?

And one other small question I also want the enemy to drop his weapon on death, is this doable?

Bump from a noob

hello.

to turn a character to ragdoll, you can premade a ragdoll version of the character and turn it on when character dies
OR
make character’s rigidbody kinematic when using animations, and when dies:

  • turn animator enabled = false;
  • turn capsule collider isTrigger = true;
  • turn capsule rigidbody isKinematic = true;
  • turn capsule rigidbody useGravity = false;
    and switch all joints of ragdoll on
  • collider isKinematic=false;
  • rigidbody useGravity=true;
  • rigidbody collider isTrigger=false;

here’s a project you might learn from (I did not check it)

to drop weapon you need to do a similar thing

  • turn collider enabled=true;
  • rigidbody isKinematic=false;
  • unparent gun.transform.parent = null;