1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00
ScreenPlay/Content/wallpaper_godot_fjord/Path3D.gd

18 lines
423 B
GDScript3
Raw Permalink Normal View History

2023-09-01 13:48:48 +02:00
extends Path3D
# Reference to the PathFollow node
@onready var path_follow = $PathFollow3D
@onready var path_follow =
2023-09-01 13:48:48 +02:00
# Speed of the movement along the path
var speed = 0.8
2023-09-01 13:48:48 +02:00
func _process(delta):
# Update the offset to move the object along the path
path_follow.progress += speed * delta
# Loop back to the start if we've reached the end of the path
if path_follow.progress >= 18.81:
2023-09-01 13:48:48 +02:00
path_follow.progress = 0.0