in my game i want to enemy chase player and for that I am using Seek-GameObject. It works if there is straight path but if the player is not reachable enemy is not moving at all. I want it to come at least the closest point it can come and stop. How can I do that?
The “Seek” action is using the Unity’ native [NavMesh system], which means that you should also correctly bake a NavMesh as described in the above linked Unity documentation.
If I understood correctly though, what you want to achieve is not supported by the Unity’s Navigation system, meaning that if the target destination position is not reachable “at all” (no path possible to be found within the baked navmesh), then the agent will not move as well.
Let me know if I misunderstood your question.
Thanks.
Yeah you get it right. Its not moving at all if the target is not reachable… And after trying it directly with NavMesh I understood that its not a NodeCanvas issue but a NavMesh issue. I still do not have a solution for that… Do you have any suggestion?
Hmm. In general the Unity NavMesh system is fairly easy to work and should work “out of the box”.
Have you tried a simple custom script that just calls something like GetComponent<NavMeshAgent>().SetDestination(someVector) and still didn’t work?