Collider with animation, or animation frame?

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.

I recommend using colliders and only turning them on when you do an attack. Here’s a video that shows you street fighter’s hitbox’s, and even shows you when the “attack colliders” turn on and off.

1 Like

Nice, so it’s actually a combination of both. The collider is enabled between specific frames of the animation. Perfect video to answer my question, thank you!