Help with 2D navagation using a tile map

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

I’m trying to get an enemy to navigate a tile map using navigation and follow path/path2d nodes. I’ve looked at some tutorials and most showed other methods that I didn’t fully understand. I’m getting the path with get_simple_path() and trying to set the points from that array to the path2d if this is impossible could someone give me a bit help in this matter. My tile map does have navigation tiles debug does prove this. Here is what I’m using currently.

var path = $Navigation2D.get_simple_path($Enemy.position,$Player.position)
if($Enemy.get_curve().get_point_count() == 0):
	for x in path:
$Enemy/PathFollow2D.offset += 1

Thanks ahead of time if you could help!

Are you updated the PathFollow2D over time?
Also, it’s only the follow children which will move with it, not the Path2D itself

Geoffroy | 2019-07-01 12:57

The path follow is being updated and the object I’m trying to move is a child of the path 2D not the node itself. The main problem is trying to get the points from the get_simple_path to the path2D via script

StoneForged | 2019-07-01 17:23