Download

Enemies damaging player through floors, possibly tied to NavmeshBoundsVolume

Hi

I have a problem I have no idea how to solve, so any ideas would be greatly appriciated!

See image below.
I have a building with 2 floors and a roof (marked by the blue lines). Enemies are marked by red X and the player by the pink P.
Enemies can melee damage the player through the floor even though they can’t see him (I have set the wall and floor meshes to BlockAll). I have NavmeshBoundsVolume (marked by Green “N”) on both floors the enemies are on. Enemies can stop damaging the player if I remove the bottom navmesh (it wasn’t even close to touching the ceiling vertically).
I have no idea why.

The way I have the enemies damage the player can be seen below in my enemy actor blueprint.

Thanks!

Just add in a line trace, before the apply damage, to check for line of sight to the player.

EDIT: Oh and on the output hit results of the trace, make a branch=>take the hit actor and do an = operation to check vs the player character=>if true, then apply the damage.