B fly in - draft

This commit is contained in:
Vojta committed 2025-06-18 23:12:28 +02:00
1 parent fad7a60c5e
commit 205551af5a
3 files changed
+28 -15

No files matched your search

+3 -2
View File
@@ -2,16 +2,17 @@ extends Camera3D
@export_range(1, 100, 0.1, "suffix:s") var travel_time: float
@export var path: Path3D
@export var follower: PathFollow3D
var follower: PathFollow3D
@export var target: MeshInstance3D
func _ready() -> void:
assert (path != null)
follower = path.get_node("PathFollow3D")
assert(follower != null)
assert(target != null)
var t = get_tree().create_tween()
t.set_trans(Tween.TRANS_CUBIC)
t.set_trans(Tween.TRANS_QUAD)
t.set_ease(Tween.EASE_IN_OUT)
t.tween_property(follower, "progress_ratio", 1, travel_time)
t.tween_callback(get_tree().quit.bind(0))