From 9274d1351f527de8ccee89eaccea1cf5dc141756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 15 Jul 2020 10:54:33 +0200 Subject: Camera : adapt zoom_boundaries --- Camera.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Camera.gd b/Camera.gd index 694706e..0dc6074 100644 --- a/Camera.gd +++ b/Camera.gd @@ -13,7 +13,8 @@ func configure(w : Vector2, c : Vector2, ts : Vector2) -> void: window = w map_center = c texture_size = ts - zoom_boundaries = Vector2(1.0, max((texture_size.x + margin.x) / window.x, (texture_size.y + margin.y) / window.y)) + var zout : float = max((texture_size.x + margin.x) / window.x, (texture_size.y + margin.y) / window.y) + zoom_boundaries = Vector2(zout - 0.5, zout) update_camera(0, 0, zoom_boundaries.y) func update_camera(x : float, y : float, z : float) -> void: -- cgit v1.1-2-g2b99