Unreal 4 hitboxes

I’m trying to make a fighting game and I want to use 3d colliders on a 2d sprite, how do I do so? I can’t find any answers. thank you in advance

Just place the 3D collider so it overlaps the 2D sprite’s body part. In Unreal everything exists in 3D space unless you’re putting it on the HUD or UMG, and that goes for sprites too. Sprites existing in the world as Actors will use the same coordinate system as 3-D objects existing in the world.

thanks! but I would like to know, what about when the sprite is animated? how do I make it so that the hitbox follows the sprite’s animation?

Hmm, not sure on Sprites. I know a couple of ways with 3D skeletalmeshes. But not sure on sprites.

I can think of the hard, tedious way where you make an array of Vectors representing the box’s position and/or x size and y size, and then every frame/tick you can decide to do a box trace or a bounds check, and your animation frame would be the index of the array to see which box position and/or shape to use.

Or you could do a similar thing where the overlap detector boxes are a permanent part of the pawn sprite, as components, and you only care that they are overlapping based on which animation frame the sprite is currently on. Every overlap detector component will always set a boolean made for it in your pawn to true when overlap begins, and false when it ends, and then when your animation reaches the frame(s) where it should be hitting something, you check those flags to see if they hit.

Or you could populate and empty Actor arrays to see WHAT the detectors are overlapping.

I’m sure there’s an easier way but that’s my naive way I came up with not having ever tried to do what you’re doing before except in Corona (a 2D mobile game engine)

i think there is something like the second thing you are describing in the sprite editor already, thanks for your help!