How to set the camera "zoom"?

108 views
Skip to first unread message

Shep

unread,
Jun 2, 2015, 4:57:31 PM6/2/15
to haxef...@googlegroups.com
Hi there,

I am quite new to HaxeFlixel so please be gentle :)

I just programmed a game after doing the tutorial and encountered  following  problem:
The FlxG.camera.zoom will only zoom in the whole game - as intended. What I was looking for instead by "zoom" is to show a bigger part of my map and by that make the game less pixelated. So instead of the camera showing  e.g. 200x200 of my map it should display 400x400 with the same window size(fullscreen for example).

I hope I explained that enoguh.


Thank you for your help.

Regards.

Gama11

unread,
Jun 2, 2015, 5:05:53 PM6/2/15
to haxef...@googlegroups.com, franzws...@gmail.com
Try doubling the gameWidth and gameHeight passed to the FlxGame constructor in Main.hx.

Matt

unread,
Jun 4, 2015, 12:53:21 PM6/4/15
to haxef...@googlegroups.com
Try FlxG.scaleMode = new RelativeScaleMode(2, 2);


On Tuesday, June 2, 2015 at 10:57:31 PM UTC+2, Shep wrote:
Reply all
Reply to author
Forward
0 new messages