Damage to Ragdoll Body Parts Subtract From Overall Enemy Health?
There seems to be a lot of ways to do this, but I'm not sure where to even start with scripting.
I have an enemy ragdoll put together, wherein the various body parts each have their own colliders and rigidbodies. For what I'm doing, I can't have a collider or a rigidbody on the parent object; I am going to use the rigidbodies/colliders of the children for damage to be taken.
What are some of the best methods to have damage of the various body parts to subtract from the overall health of the parent object? Should I have individual scripts on each body part that references the enemy health script at the parent level? If I do it that way, what would that code possibly look like?
Or, should I do it the other way around and have the enemy's health script refer to the children? I wouldn't even know where to start to code something like this, either.
Any thoughts or ideas? Couldn't find very many good answers around the internet... Thank you!
Your answer