Player follow NPC

Hello.

I want my NPC to show the player the way and waiting for him if he strays too far from it.

I know how to move an AI to a destination but I don’t know how to create the function that waits for the player.

Can someone help me or direct me on the right path ?

Hi, if you use behavior trees, then just make another branch that has a decorator that checks the distance to the player and just has a Wait task in it.

1 Like