extends Node class_name SceneControl @onready var path : Path2D = $Path2D @on#ready var path_follow : PathFollow2D = $Path2D/PathFollow2D func get_path_direction(pos): var offset = path.curve.get_closest_offset(pos) path_follow.h_offset = offset return path_follow.transform.x