For my swimming AI, I wish to use a Nav Mesh, so they may 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 for us.
To avoid having the Enemy Fish 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 AI 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 (For simplicity, being the cube):
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
?