Fly around

This commit is contained in:
Vojta committed 2025-06-18 22:37:47 +02:00
1 parent 84f8cf5d76
commit c793535235
9 files changed
+103 -49

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
extends Camera3D
@export_range(1, 100, 0.1, "suffix:s") var travel_time: float
@export var path: Path3D
@export var follower: PathFollow3D
@export var target: MeshInstance3D
func _ready() -> void:
assert (path != null)
assert(follower != null)
assert(target != null)
var t = get_tree().create_tween()
t.set_trans(Tween.TRANS_CUBIC)
t.set_ease(Tween.EASE_IN_OUT)
t.tween_property(follower, "progress_ratio", 1, travel_time)
t.tween_callback(get_tree().quit.bind(0))
func _process(delta: float) -> void:
look_at(target.global_position)
global_position = follower.global_position
+1
View File
@@ -0,0 +1 @@
uid://co2pjpdo4nyto