le pathfinder emène exactement là où on a cliqué
This commit is contained in:
@@ -77,7 +77,7 @@ func _process(delta: float) -> void:
|
||||
controled.moveFeetTo(world.to_global(world.map_to_local(toFollow.front())));
|
||||
else:
|
||||
var distance_to_goal = abs(destination - my_global_position)
|
||||
if distance_to_goal>Vector2(3, 3):
|
||||
if distance_to_goal.x > 3 or distance_to_goal.y > 3:
|
||||
controled.moveFeetTo(destination)
|
||||
else:
|
||||
destination = Vector2.INF
|
||||
|
||||
Reference in New Issue
Block a user