Ragdolling not properly problem.

How do you get the ragdoll to instantiate at the same exact, form of the player/AI?

My ragdoll is almost spawning at the desired position and rotation but its as if it gets pushed instantly onto the ground and instantiates a bit to the front? Can’t tell it happens too fast.

I fixed the physics layer part. Even tried making the AI completely ignore the ragdoll too. Nothing worked.

public GameObject ragdoll;

void Death(){
// This ignore didn't work either.
Physics.IgnoreLayerCollision(11, 15);


Instantiate(ragdoll, player.position, player.rotation);

Destroy(gameObject);

}

Ok so the problem from what I see is that when instantiated it get pushed out or collides with something?.

So how to get it to instantiate properly?

How I got it to work is just make the player a ragdoll but setting all the rigidbodies to isKinematic, and switching isKinematic off when I die.