summaryrefslogtreecommitdiffstats
path: root/game_camera.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game_camera.gd')
-rw-r--r--game_camera.gd6
1 files changed, 5 insertions, 1 deletions
diff --git a/game_camera.gd b/game_camera.gd
index 4348ace..a92f23c 100644
--- a/game_camera.gd
+++ b/game_camera.gd
@@ -3,7 +3,11 @@ extends Camera2D
## Amount to smoothly offset the camera if the parent is a Player.
@export var offset_amt: Vector2
-# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _ready() -> void:
+ if not position_smoothing_enabled:
+ await get_tree().create_timer(0.1).timeout
+ position_smoothing_enabled = true
+
func _process(_delta: float) -> void:
var parent = get_parent()
if parent is Player: