AI is ignoring Target Actor with "Can Ever Affect Navigation" enabled

Hi there

I was wondering why my AI would ignore actors with the above mentioned function enabled? I’ve been making an RTS/Survival game for quite some time now (my first project). My AI works fine and they attack their NPC enemies without any problem, but as soon as they should target “Buildings”, they will only do so if “Can ever affect Navigation” is disabled. The problem is I need it to be active so that Friendly/Enemy NPCs won’t try to walk through buildings.


In this image “Can ever affect Navigation” is enabled, but the enemy won’t move towards the wall, even though it recognizes it as an enemy. The AI just stands there looking at it.


As soon as I disable “Can ever affect Navigation”, the AI continues to attack the wall as I want it to. The problem here is that my friendly NPCs will try to defend the wall, but they try yo walk through it.

In conclusion, is there anyway to have my AI walk towards and attack an Actor Blueprint (such as the wall in the screenshot) while “Can ever affect Navigation” is enabled, or is there another work around?

Have the walls effect navigation. Do a sphere cast in front of the character to get the enemy wall. Find the closest point on the navmesh to it. Have the character go there, turn towards the wall and enter the atack state.

Thank you, that lead me in a direction which worked for me.


For anyone else maybe sitting with this type of issue. I used “Get closest point on collision” of my target (which was the wall). This allows my enemy to move towards this location with the nav mesh still being affected by the wall actor.


As seen here, the trace is done (the yellow sphere). My enemy moves towards it and attacks successfully with my friendly AI now taking alternative routes towards the enemy, instead of trying to move through the wall.

Much appreciated.

1 Like

Glad you were able to get things moving along :smiley:

1 Like

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