Which method is more performant, or you can just state the pros and cons for each method.
Like place hurt boxes attached to the skeleton’s socket so move when animated, then line trace to detect if hit that hurt box which body part was hit?
or use the physics skeleton on some skeletons and apply certain physics material on that physics capsule around that specific body part, then line trace to hit that physics body part capsule and return which body part was hit
The reason I’m asking as it seems like the physics material is the best option as appears more performant as not calculate the hurt boxes all the time. But see many games and even AAA games use hurt boxes, so wondering why?
was just following this video at this time stamp, and they use the physical capsule on the physics skeleton as the hitbox by applying physics material on it. So guess 2 for 1 deal as get both a physics capsule and hit box
While the other method was making an entirely separate hit box attached to the socket in additional to the already physics capsules
I guess the real question becomes if I want the hit box and physic capsule for ragdoll to be the same thing / same size. Was wondering if that would save performance?
I see you’re asking the most optimized way on detecting which bone of your character gets hit. Like I said before, neighter collision boxes nor a physics asset were required for line traces to return which bone they hit. Placing collision boxes on body parts is not obsolete though, they still got their purposes. About physics asset, you can still detect which bone gets hit by a line trace independently than the physics asset. All you need to do is breaking the hit result and returning the hit bone name. If the question is that “will detecting the individual body parts rather than a bigger volume covering them reduce performance”, the answer is no because your character is already using it’s bones to animate. And line traces have absolutely no problem delivering your hit results. There’s really no extra services you’re activating during that process. Hope this clarifies your confusion
Use whichever collision type/trace you setup for your weapons. For projectile set the Projectiles collision to custom, Projectile and ensure you Ignore Pawncapsule. Same if your using hitscan.
Physmat way simplifies dmg calculation + returns a surface type (flesh) for hit fx (audio && visual).
You’re only dealing with 8 possible hit localities vs the total num bones in skeleton (50+).