Floating Pawn get's stuck mid air/ Navmesh path points too sparse

I’m fiddling around with pawns moving on the navmesh. Since I have in mind doing kind of a RTS style with at least several 100 units, using the character class turned out to be not feasible for performance reasons.
My pawns can move on the navmesh via the floating pawn movement, that’s fine.

However, I encountered a problem: The navmesh path points sometimes are too sparse in hilly terrain.
So my pawns try to fly towards the next point or go through the terrain sometimes. This is not just optically unpleasant, but they also get stuck mid air, if they are too high or low from the navmesh:

(the red line is, what they are doing, the green one, what I’d like them to do)

The character class does apparently not have these problems, due to gravity and collision options - but for my pawns I want to make them as performant as possible.

So I see 2 options:

  1. Do a line trace in the tick event to detect the ground and snap the pawn to the ground.

  2. Make the nav path points more dense.

Number 1, I can figure out, but would like to avoid due to performance reasons. Is number #2 possible? If so where would I change this?

And lastly, if my pawn get’s too high from navmesh for whatever reason, how can I prevent it from simply getting stuck and rather continue “flying” to the destination point (at least it would get there)?

2 Likes

Hi i am currently having the same issue. Was wondering if you managed to find a solution for this?

Same question…