blob: 9f231e01eee28b7756cba21a8ee4d7bdbfd60be6 (
plain) (
tree)
|
|
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
|