first commit
This commit is contained in:
10
Scripts/locomotiva_target.gd
Normal file
10
Scripts/locomotiva_target.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends PathFollow3D
|
||||
|
||||
@export var velocita_treno: float = 5.0
|
||||
@export var in_movimento: bool = true
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if in_movimento:
|
||||
# 'progress' è una variabile nativa di PathFollow3D
|
||||
# Aumentandola, il nodo si sposta lungo la curva in automatico!
|
||||
progress += velocita_treno * delta
|
||||
Reference in New Issue
Block a user