Camera can be zoomed with the scroll wheel. Position smoothing enabled.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user