Why is my line trace not hitting

I’m using a linetrace to see if you hit when shooting. I’m using a custom “Damage” trace channel but nothing is happening. I’ve confirmed the pawns have overlap events enabled for the Damage trace, but my Damage trace goes right through them with zero overlap events.

This here is the line trace

This is the character who is supposed to be getting shot dedz. (Collision settings are on the right)

This dude must really be a ninja for these to all be misses.

Hey @Lowenfas!

The way traces work, they’re looking for Blocking hits. So just try changing the enemy’s reaction to the damage channel to Hit! That should solve it.

And then instead of the “On event overlap”, “Damage” with the hit object as target and “OnDamaged” on the receiver should be the one to use. The damage system in Unreal is really rather simple and efficient with lots of common options baked in! :slight_smile:

1 Like

WOOOOOOOW. Changing the character collision from overlap to block was all it needed. I had a feeling it was going to be something incredibly simple and stupid.

I still don’t fully understand though, because I have another attack involving a stab, which creates a sphere trace around the knife mid thrust and that works just fine. So apparently sphere traces trigger the overlaps just fine but line traces do not.

Thanks Mind-Brain. Hopefully one day me to will have good mind with me brain.

1 Like

So the reason for that is overlap needs colliding volumes. The line trace is one dimensional, and it needs minimum two dimensions colliding with minimum two dimensions for it to be an overlap. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.