Issue with FollowerEntity Jittering on Terrain with Large Drop-offs when Increasing MaxStepHeight in RecastGraph

When generating a navigation mesh using RecastGraph, I’ve encountered an issue where increasing the MaxStepHeight value causes significant discrepancies between the terrain and the navmesh in areas with pits or holes, resembling a deep-water lake. When using FollowerEntity as the agent, these agents tend to jitter up and down at locations with such discrepancies. Increasing the agent’s height can alleviate this issue to some extent, but if the drop-off is too large, it seems impractical to proportionally increase the agent’s height. Therefore, I am reporting this problem to inquire if there is a better solution. The root cause of this issue is the continuous up-and-down movement of the FollowerEntity, which was not immediately obvious due to the subtle elevation changes in the actual game map. To better demonstrate the issue, I have recorded a video where I set the MaxStepHeight to 1 to create more pronounced discrepancies.

Hi there- sorry for the extra late response! This one slipped through the cracks and I found it when I was checking for unanswered posts. So I went to test this for myself, with MaxStepHeight set to 1 (which is default apparently) and I’m not seeing these issues on my end. If you’re still having this issue, would you be able to send some screenshots of your AstarPath and FollowerEntity settings?

This time, I used the simplest reproducible scene with parameters. First, the scene consists of 25 Unity default cubes, then I scaled them up three times and arranged them in a square pattern. Finally, for each additional inner circle, the height is reduced by 0.5. For plugins, I used RecastGraph and FollowerEntity, and all parameters were set to their default values. The video link is: https://www.youtube.com/watch?v=qwCyfRFLQKw. I believe the issue arises when RecastGraph generates the navigation mesh; it blurs areas that match the MaxStepHeight into a flat surface. When FollowerEntity encounters this pit, due to gravity calculations, it has not yet landed, and there is some mechanism that corrects to ensure that half the height of FollowerEntity is not below the navigation mesh, causing the up-and-down shaking.

Actually, would you be able to ZIP and send that project file to me? Would probably be a lot easier and less prone to reproducing issues than doing it by hand. If you don’t feel comfortable with that, no problem :slight_smile:

EDIT: Also I love the commitment to the game on the screen above. Full respect on that one haha :fist: