Skip to content

Commit

Permalink
FlxCamera: account for FlxG.initialZoom in updateScroll()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 authored and Aurel300 committed Apr 17, 2018
1 parent 2908b88 commit 0fe9d6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flixel/FlxCamera.hx
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ class FlxCamera extends FlxBasic
public function updateScroll():Void
{
// Adjust bounds to account for zoom
var zoom = this.zoom / FlxG.initialZoom;
var minX:Null<Float> = minScrollX == null ? null : minScrollX - (zoom - 1) * width / (2 * zoom);
var maxX:Null<Float> = maxScrollX == null ? null : maxScrollX + (zoom - 1) * width / (2 * zoom);
var minY:Null<Float> = minScrollY == null ? null : minScrollY - (zoom - 1) * height / (2 * zoom);
Expand Down

0 comments on commit 0fe9d6a

Please sign in to comment.