Camera can be zoomed with the scroll wheel. Position smoothing enabled.

This commit is contained in:
gdz
2025-12-14 00:16:26 +01:00
parent fbc4795e8a
commit 6bfc792cd0
2 changed files with 7 additions and 1 deletions

View File

@@ -14,4 +14,9 @@ func _process(delta: float) -> void:
if Input.is_action_pressed("MoveLeft"):
global_position += Vector2.LEFT * 2
if Input.is_action_pressed("MoveRight"):
global_position += Vector2.RIGHT * 2
global_position += Vector2.RIGHT * 2
if Input.is_action_just_released("ZoomIn"):
$SmartCamera2D.zoom += Vector2.ONE
if Input.is_action_just_released("ZoomOut"):
$SmartCamera2D.zoom -= Vector2.ONE