Smooth Camera Zoom
-
I'm currently assessing HaxeFlixel to see if it's suitable for a new project I'm working on.
I need to support zooming in/out of a particular scene. I've attempted to do this via a tween on the camera but I always get a shaky result. Any thoughts on how to resolve this?
I've simply added the following code to several of the samples.
FlxTween.tween(FlxG.camera, { zoom: 2 }, 20);
-
You should use FlxZoomCamera, it smoothly does zoom. You can see an example of its beauty here.
-
Thanks! Works a treat.