totallybueno Posted January 1, 2015 Share Posted January 1, 2015 Hi there, I´m having a problem scaling a game for mobile purposes... everything works fine in desktop, the only problem is scaling in mobile, I want to scale using EXACT_FIT for this case but it´s not working at all and I don´t know why. Firs of all, I´m using Phaser v2.0.7 with Pixi.js v1.6, and I can´t use a most recent version of Phaser because it´s not working with my game and cocoonjs, so not new Scale Manager at all In my html, I create the game this wayvar game = new Phaser.Game(1280, 720, Phaser.AUTO);and the game appears on my cocoonjs launcher but really small, probably is using the minWidth and minHeight... This is my code in Boot.js (I´m using the mobile template), can anyone tell me why is not working?, everything looks fine to me if (this.game.device.desktop){ //THIS PART IS OK}else{ this.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT; this.scale.minWidth = 480; this.scale.minHeight = 260; this.scale.maxWidth = 1920 this.scale.maxHeight = 1080; this.scale.forceOrientation(true, false); this.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); //THIS IS WORKING this.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); // THIS IS WORKING TOO this.scale.setScreenSize(true);} Link to comment Share on other sites More sharing options...
Recommended Posts