using Godot; public partial class Path : Path3D { public PathFollow3D PathFollow { get; private set; } public Marker3D Target { get; private set; } public override void _Ready() { PathFollow = GetNode("PathFollow"); Target = GetNode("PathFollow/Target"); } public void Setup(Transform3D globalTransform, Curve3D curve) { SetGlobalTransform(globalTransform); SetCurve(curve); PathFollow.ProgressRatio = 0; } public void Teardown() { if (!IsQueuedForDeletion()) QueueFree(); } }