How can i make a enemy pathfinding Script to a player

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By fa019

Hey Guys!

I am so hard crying that i cant fix my Problem in my 3D Project with a navmesh.

  1. How can i get a Position from a node in a other Scene?
  2. How can i use the get_simple_path?
  3. How can i make my RigidBody to follow that path to my Player?

i can’t find anything on WWW and asked in several Forum. Would be very nice if somebody hat a solution for that or a demo Project.

thank you guys

In the SceneTree of the instanced scene, you may be able to get an array of child nodes in that scene (I think the function is get_children()). Then you can walk through the array and find the node you want. Once you find that node, getting its global position isn’t that difficult.

I would like to help with the get_simple_path() function, though, but I’ve experimented little with pathfinding.

Ertain | 2019-05-03 21:25