realistic melee weapon damage

Ok, a friend made a zombie claws swep for me, but it only does damage to the ent with a trace from the middle of your screen… I’d like it to be a line of damage instead of a point, hence the zombie swinging, not punching.

Also how do I make the decal left behind on walls from bullet holes to knife-like decals

What do you mean line of damage, you could use a rise over run equation to calculate if the damage is between two points, and in a graph. If the position is inbetween your two initial points then apply damage to the entity. Here is a guess …

Well, the formula for finding the slope of a straight line is

s = y2 - y1
x2 - x1

so… Eh i forgot how it would be done :/. My method probably would not work anyway.

Ghetto Method(?): Create a physical entity on the players hand that on touch deals damage. Use BoneMerge and SetParent or something.

Really juts guessing here

rofl I like the ghetto method can you give an example of it? im a noob :slight_smile:

I saw a thread about this once. i think that they decided that doing multiple traces was best.

This is what the TraceHullAttack function is for. The crowbar works the same way.