blob: 99bc3a21af2eb7d673401ffb9decf0751138ee5b (
plain) (
tree)
|
|
extends Node
class_name SceneControl
@onready var path : Path2D = $Path2D
@onready 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
|