2d Fighting hitboxes

My current method involved duplicating my animations and coloring over them to represent hitboxes. Then playing that animation overtop the attack animation. This leaves no room for individual frame data like damage, velocity, knockback etc. It did however, allow for defining of the shapes. I could just draw the shape in paint. If I use collision boxes or spheres then I lose the shapes and have to figure out how to decide which shape to use and I have no way to tell when to spawn them because AFAIK there is no reliable way to determine which frame the current animation is on. What’s the best method to go about doing this? I don’t want anything super accurate like skullgirls but I need something that’s accurate enough for a smash bros inspired or street fighter inspired game.

each melee attack can either have a list of Sphere traces and Box Traces, or they can spawn a large projectile. you can SpawnActorFromClass and OnBeginPlay SetLifeSpan to make it self destruct. or instead of spawning/destroying actors all the time, you can enable or disable collision on existing collision with SetCollisionEnabled.

if you are using a SkeletalMesh, you can spawn them with AnimationNotifies in AnimationMontages. if you are using Paper2D, you will have to use timers. either way, setting up frame data will be difficult without an in game editor. an attack would have an animation, and an array of frame data structs.


Smash Bros Hitboxes:

https://www.youtube.com/watch?v=MOlQv-9S1zE

StreetFighter Hitboxes:

https://sites.google.com/site/scrubfighter/understanding-the-mechanics-frames-hitboxes-and-hurtboxes

http://combovid.com/?p=3156

https://www.youtube.com/user/UltraDecapre/videos

Fighting Data:

https://tcrf.net/Street_Fighter_II#Parameters

http://www.infinitymugenteam.com/infinity.wiki/mediawiki/index.php?title=List_of_Command_Perameters

http://www.infinitymugenteam.com/infinity.wiki/mediawiki/index.php?title=Character_Creation_Tutorial