From f97ee1d7c41e07296b6c31b9b85aa299805ba2f1 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 4 Dec 2025 17:32:05 +0200 Subject: Add test NPC --- game_camera.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'game_camera.gd') diff --git a/game_camera.gd b/game_camera.gd index 4a9ac1d..b38d492 100644 --- a/game_camera.gd +++ b/game_camera.gd @@ -16,7 +16,10 @@ func _process(_delta: float) -> void: if targets.size() == 0: return for target in targets: - pos += target._camera_target() + if target.has_method("_camera_target"): + pos += target._camera_target() + else: + pos += target.global_position n += 1 global_position = pos / n -- cgit v1.3