merlinodreamlab
6/27/2019 - 1:29 PM

Follow a path

Follow a path

extends Path2D

# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var follow = get_node("PathFollow2D")

# Called when the node enters the scene tree for the first time.
func _ready():
	set_process(true)
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	follow.set_offset(follow.get_offset()+350*delta)
	pass