How to increase vertical Nav Mesh detection for AI Actors?

I think what you are looking for is to implement some BP for when the fish detects a certain actor (platform) they react or move a certain way. Maybe use Actor Begin overlap?

It says so in the OP: The AI is swimming, a fish to be exact. The game is played sidescrolled and the obstacles are props of a sunk ship, meaning the pathfinding may get too complex to do in just blueprint, which is why I was hoping someone could suggest a solution for the Query Extent issue.

For swimming AI, I wish to use a Nav Mesh, so they can avoid obstacles and swim up and down - preferably.
I figured I should try to solve this with a Nav Mesh, since UE4 has kindly implemented it.

To avoid having the fishes stick to the “ground” of the map, I would have to increase the Query Extent, which is testable with a Navigation Testing Actor (see images below).

So what I did:

  • Add Nav Mesh Bounds volume
  • Add AI actor with Character Movement Component
  • Increase Default Query Extent in Project Settings (Engine > Navigation System)
  • No Profit?

Increasing the Default Query Extent, under Agents, increases it along the positive and negative z-axis, which is unfortunate, since I would like the enemy fishes to prioritize the bottom Nav Mesh surface.


I have attached two screenshots showcasing the “bad” behaviour, which I would like to circumvent.

The blue Bounding Box, showcases the Extent, which is scaled in both directions, vertically. Preferably, I would like to move it down, relative to the Nav Agent.

To hit the point home, here is what happens when the enemy swims underneath some platform:

So my question to you good people is: how would I lower the Nav Mesh detection, without increasing the actor size, or something rather silly. Is there a clean way of having the “Enemy Fish” ignore the top platform as much as possible, without using a Nav Modifier Volume ?

So you suggest creating my own pathfinding for the swimming AI? Is there a good reference somewhere? I haven’t been able to find anything related to Swimming AI in UE4.

I assume you have an AI behavior tree. You can implement some kind of sight check, and have them move to a waypoint. Detect it however you like, break the result cast to the object types you want it to avoid or whatever (maybe check some variables), Maybe add a line trace if nothing blocks their view (so they properly see it) and then have that character call it’s response action to that particular object.

Maybe you could also look into splines? I’m not sure what your game is about and how your AI needs to move.