Updatin path

Hi i’m using the pathfinding with a grid graph and i have a npc that should follow the player but i cant get the path to update when the player changes position. So how do i do that?

Hi

Try the included movement scripts (e.g AIPath). They will recalculate the path automatically.

is there a simple way for me to make it work with 2d objects so it wouldn’t use character controllers but instead would use rigidbody2d

Hi

There is no built in script for 2D movement. However I don’t think it should be that hard to convert the existing scripts from 3D to 2D.
I am working on a 2D controller, it might be included in the next update.