Melee Attacks - Using Projectiles, will it work?

Hi guys. I am still trying to work on getting melee to work but I am not going to be creating any models yet and most of the melee tutorials I have found rely on having a model to animate and attaching a volume to that model so when it overlaps it does damage.

However because I am not working with any models and animations how would I go about doing this?

I have one theory that I would like to run by you guys.

Would it be possible to treat melee like you would treat projectile damage? But instead of having a long ranger it has a very very short range? The the projectile only travels about 1 meter from the player before it is destroyed therefor it only deals damage to entities within the range of 1 meter from the player.

I am trying to make a survival type game and the next step I am working on is implementing attacks / using weapons and tools where different tools work on different objects in the world dealing damage based on stats within the weapons and tools but I have been struggling for a while now with just getting melee damage to work. Arghh.

I appreciate any support I can get with this. Thankyou!


You can do it, I know games that have done it. The melee really didn’t feel very good, but it was functional.

I don’t advise doing it via projectiles, but there are ways to get around not having animations to use (a problem I am VERY familiar with, which has blocked me from progress in many engines when trying to do melee combat games).

In UE4 however, I think there are some interesting ways you could approach this without having animations.

You could, for instance, use a spline to create the motion of the hand for your character, and then use the IK system to have the hand follow that point. It will take some fiddling to make a decent looking attack that way (and you may need to add in some manual rotation of the hands/whatever your weapon is parented to), but for general swipes and slashes it should be easy (i.e., just create an arc with the spline, you’ll need to put it in space relative to your character).

Then you just do the same thing those tutorials mention (have a capsule or box or whatever parented to your weapon and test collision on that).

No idea if that’s feasible, but it seems like it might work.