Phaser: Camera Zoom : set Min / Max allowed

Created on 14 Dec 2018  路  1Comment  路  Source: photonstorm/phaser

Phaser 3

The camera zoom do not have parameter to set a min and max zoom we allow the user to go to.
The minimum is 0.1, but in some cases that do not make any sense to allow the user to go beyond 0.5 for example.

Here are 2 cases where the min zooming is too high and that's not user friendly at all :

screen_shot_2018-12-12_at_10 31 54_pm

screen_shot_2018-12-12_at_10 34 03_pm

Thank you !

Most helpful comment

To be honest, this is so game specific that you need to manage it in your own code. There's no point Phaser enforcing this. While I could add in min and max properties it seems a bit pointless when it's solved so easily by a quick logic check in the game code.

>All comments

To be honest, this is so game specific that you need to manage it in your own code. There's no point Phaser enforcing this. While I could add in min and max properties it seems a bit pointless when it's solved so easily by a quick logic check in the game code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BigZaphod picture BigZaphod  路  4Comments

rootasjey picture rootasjey  路  3Comments

sercand picture sercand  路  3Comments

samme picture samme  路  3Comments

MarkSky picture MarkSky  路  3Comments