Prevent AI to go through walls

Is there a way to prevent moving props (like custom npcs or AI) from going through walls? So like when the player is getting chased to prevent that the enemy goes through walls?

I wonder if this is where the, Use Auto Navmesh Flags, and Can Ever Affect Navigation settings of the object (walls), and, the Can Ever Affect Navigation setting of its StaticMeshComponent come into play.

I used 'barrier_device’s to great effect in blocking bots from going over cliffs. You can initialize them to allow players to go through them if that makes sense for your gameplay.