A NavMeshAgent can change his generate path ?

Hi guys !

In my game project (2d isometric), I need some characters to use roads to move around.

I am using the navmesh (with the collision system) to generate the path to the destination (in pink) but I would like to know if it is possible to change this path to a path constrained by a route system (in yellow).


(NavMesh with collision system)

(Pink : default AgentPath // Yellow : the path I want to create)

My question is simple: Is it possible to modify the generated path (pink) by the one I want to do (yellow) by setting up a grid system and a rewrite of this path with respect to this constraint? (or maybe another solution)

Thanks in advance ! :slight_smile:

You can create Blank Boxes simulating the Path, give them a certain Layer and just Bake those.
ofc. put them under the road so it fits your path/Level Design

1 Like