This commit is contained in:
torsten 2026-02-16 14:35:43 +01:00
parent 680c6243c6
commit 9b457d6fb4

View file

@ -5,7 +5,7 @@ var target: Node3D = null
var offset = Vector3(0, 3, 4) # Klassische NWN Perspektive
func _process(delta):
if is_instance_valid(target):
if is_instance_valid(target) and target.is_inside_tree():
# Sanftes Folgen (Lerp) für smoothe Bewegungen
var target_pos = target.global_position + offset
global_position = global_position.lerp(target_pos, delta * 5.0)