HaxeFlixel / flixel-addons

Additional classes for HaxeFlixel
170 stars 136 forks source link

FlxZoomCamera does not update drawable area after zoom #249

Open xerosugar opened 8 years ago

xerosugar commented 8 years ago

when zooming in from default zoom and setting 'FlxG.camera.target' to different flxobjects placed around the game world the area which is drawn by the camera does not seem to be updated properly (you can see the black areas outside the camera's limits).

madnotdead commented 8 years ago

@xerosugar Can you post the code snippe where you set the zoom? Are you updating camera bounds after zooming?

xerosugar commented 8 years ago

I did not update the bounds, just the 'targetZoom' after following my FlxObject target.

I followed this example: http://coinflipstudios.com/devblog/?p=448

I've tried to adapt this to what I'm doing as well: https://github.com/HaxeFlixel/flixel-demos/blob/master/Features/FlxCamera/source/PlayState.hx (the setZoom method) but I can't get it to work either (or, respect the world bounds). If this was a bit more generalized I think it could possibly replace the FlxZoomCamera.

madnotdead commented 8 years ago

@xerosugar take a look at https://github.com/HaxeFlixel/flixel/issues/1766