Melee Combat

So I’m making a survival game and I need a way for the player to kill things and i have two ways in mind but I need to know which one is better. First way do a line trace make sure its the right distance and then damage the enemy. Add a hit animation and then put a collier on it and when it collides do damage.

That’s fine, except for “First way do a line trace make sure its the right distance and then damage the enemy.” Don’t do damage before the animation. Other than that, yeah that works fine. There’s a ton of ways to do things. One way isn’t better than another. Don’t stress it so much dude.
Personally, I use a collider like you said instead of a ray trace.

The animation is nothing but a visual representation for the player. You never “need” animation for anything. That said, if you’re doing something like a punch or kick, or something where you want the hitbox to move, it’s easiest to attach the collision box to a socket on something that’s animated so it moves with the animation. But if you’re just bumping into things then you don’t need an animation. Ray traces are good for shooting and if you’re shooting, you don’t need collision on the bullet, just do a raytrace from the gun.

On the imported skeletal mesh, in the animation blueprint, you’ll see on the left side a hierarchy of bones. Right-click on one and click Add Socket. You can position it so it’s wherever you want but it’s tied to the movements of that bone. Play any animations you already have or make new ones for the skeleton if you want and it’ll move with the bone.

For that you’d go to Blender or Maya or another 3D animating software