diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-11-19 21:33:12 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-11-20 23:08:30 +0200 |
| commit | 74494315303723b6cdac5198d9fc90f334ced778 (patch) | |
| tree | f044924bde75be5701200f3bc795b7ea02be8ac3 /game_camera.gd | |
| parent | cb1655c3e3958845ec6b2b6ab634149cede152a8 (diff) | |
Improve transitions
Diffstat (limited to 'game_camera.gd')
| -rw-r--r-- | game_camera.gd | 6 |
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: |
