I haven’t spend a lot of time in animation territory and I’ve never worked on a game “seriously” that contained combat. For my melee attack animation, should I put a collider on the weapon and use that to trigger a hit, or just check the distance to target based on weapon type and trigger the hit at a certain animation frame?
Right now I’m thinking about pros and cons, but haven’t implemented either yet.
Collider Pros:
More realistic
No “false” hits.
Collider Cons:
Performance?
Could miss when it should if the models don’t line up.
Animation Frame Pros:
Consistent (guarantee to hit when the user expects it to)
No overhead physics performance
Animation Frame Cons:
Collider misses but still counts as a hit, eg every MMO ever.
Timing on visual hit and damage calculated will likely be off, depending on models.
It’s pretty even across the board, so I thought I’d ask the community how they handle it, or if there’s a different method altogether to get good results and simple implementation.