diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 10:54:33 +0200 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 10:54:33 +0200 | 
| commit | 9274d1351f527de8ccee89eaccea1cf5dc141756 (patch) | |
| tree | 9c9cbde594d5a9b2b264178b57eb29843beb1eca | |
| parent | 069071ad40850f2880367885a3100676f716030d (diff) | |
| download | godot-hexgrid-9274d1351f527de8ccee89eaccea1cf5dc141756.zip godot-hexgrid-9274d1351f527de8ccee89eaccea1cf5dc141756.tar.gz  | |
Camera : adapt zoom_boundaries
| -rw-r--r-- | Camera.gd | 3 | 
1 files changed, 2 insertions, 1 deletions
@@ -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:  | 
