A* Pathfinding Project

Modify Mesh at Runtime


Is it possible to alter the shape of a NavMesh without altering its logic at runtime?

For example: having a flat terrain where a mountain grows and pushes the agent on top of it to follow the curvature of the mountain without having the agent fall through it.



For graph updates, take a look at https://arongranberg.com/astar/docs/graph-updates.php

If you modify the terrain quickly it is possible for agents to fall through. What you could do is move the agents upwards at the same time as you modify the terrain. Alternatively you could use raycasting to reposition the agents when the terrain has been updated.