How do I make navmeshagent follow the most nearby player? (photon pun 2)

13 Views Asked by At

I am trying to make a multiplayer game where a monster chases you in a generated maze. but there is a problem. I am trying to make to monster follow the closest player but it just doesn't seem to work. does anyone know how I can make it work? I would really appreciate it :)

NOTE: the player prefab spawns 1 second after the scene is loaded.

I have tried a lot. But just nothing seems to work. and I can't really give more context because i don't have more context.

0

There are 0 best solutions below