HELP: Damage Location.

Hi All

Is there a way to tell from what angle the damage got applied from.

Example, if you shot something in the back, it will know it’s back was hit?

Depending on what you want to do, there’s impact normals output from a hit or you can get the dot product.

sorry I cant give a better answer but it is 105 and it is hard to think

I would search up the point damage event, it has a shot from direction output pin on it

Cheers guys,

I am using radial damage for this.

When I receive damage I have 3 Pins

Damage Type
Instigated By
Damage Causer

Could I pull detail from any of these?

:slight_smile:

This should work:

However in this example if the enemy is behind your character and throws a grenade that explodes in front of the character, it would think that the damage was from behind (since the enemy is behind). If you need the opposite behavior, use the Origin pin instead of Damage Causer pin.

1 Like

On the “Apply Damage” event the “Damage Causer” tool tip says “Actor that actually caused the damage (Eg: the grenade that exploded)”

So you should have a self reference connected to the “Damage Causer” pin

If you need the Player pawn then use the “Get controlled pawn” function from the “Instigated By” output pin

This looks really useful, but the picture showing the answer is gone.

Can anyone show how this works again?

Trying to extract data from the 'Damage Causer" pin is giving an ‘Accessed None’ error, so I’d like to see it done right.

Edit: Sorry to bump after 6 years… may have figured out a solution. Will post again.

The error was a dumb mistake (forgetting to pass a ref to self), but to make up for the missing solution picture above, here’s one way to check where an attack is from.

In my case, I just needed to know from the left or right, but calculating other directions could be done repeating the same, just replacing ‘Get Actor Right Vector’ with 'GA Forward… or “GA Up…”

fix
fix2

Also had my Damage Causer reference get destroyed too soon occasionally, so I saved the location data into a separate variable as soon as it passed.

1 Like