...
This commit is contained in:
parent
680c6243c6
commit
9b457d6fb4
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue