The project I have been working on (just for fun) crashes whenever the player moves too far away from navmeshes, or when jumping over enemies.
The enemies currently use navmeshes (scripts adapted from the demo project) to follow targets (such as the player), and switch to a more direct follow code when within a certain range.
I have tried modifying the navigation follow code in different ways, but have had no success so far.
The problem appears to be caused by the separation of the player from the navmesh, either when the player jumps (something I would like to keep while also having navmeshes), or when the player leaves the navmesh area (could be solved by extending the navmesh, but not ideal for areas that enemies should not be able to go).
A small reproduction project can be found here:
And the whole project can be found here:
Does anyone know how to implement a player jump system that doesn't crash when being followed by enemies that use navmeshes?
Any help is appreciated.
Adding timers to limit the number of times a second that enemies try to recalculate paths to a moving target seems to have solved the problem.