diff options
Diffstat (limited to 'game_camera.gd')
| -rw-r--r-- | game_camera.gd | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
