I’m working on implementing a combat system similar to Overgrowth, and I’m really debating with myself over how I want to configure hit detection. There are really only two specific things I need model-specific information for: 1) to simulate flinching/knockback local to the body part that got hit, 2) to calculate damage, either from impact (punches to the face hurt more than punches to the gut) or from falling (landing on your head hurts more than landing on your butt).
Each time the player attacks, I activate hurtboxes on their hands and feet which listen for collisions with enemy actors and notifies them on impact, a task that a single capsule collider roughly corresponding to their body is more than suitable for.
It seems like the simplest way to get model-accurate hit detection would be to place trigger volumes around the head, torso, limbs, and so forth, but that feels pretty hard-codey and would require me to manually configure hitboxes for each character, a task that becomes unwieldy as the cast grows, and downright problematic if I try to implement procedural character generation later on. Is there a cleaner way to get references to where the model has been hit?