I have an enemy with a basic ragdoll set up. Except instead of instantiating the ragdoll, I just have all the bone colliders on the character at all times and I just set them all to false when its killed by a raycast projectile:
if (enemyDead == true) {
for(int i = 0; i < rigidbodies.Length; i++){
rigidbodies*.isKinematic = false;*
_ rigidbodies*.WakeUp();_
_ }*_
My raycast projectile is scripted to add force to rigidbodies:
AddForceAtPosition(ray.direction * Force, hit.point);
But the enemy will just crumple in place when the ragdoll is activated. I’m assuming it’s because the force from the raycast is applied before the enemy’s ragdoll is set to isKinematic = false. So how do I “save” that add force at the hit.point and then re-apply it to the newly non-kinematic ragdoll? Or is there a better way to do it?