PRSoluções Posted March 30, 2016 Share Posted March 30, 2016 Hi, I made a new camera follow mode, because none of existing type is what i want. I dont know if it is a great feature to Phaser lib, but to me is what i want. The only problem in my update calc, is a flick when my sprite is moving. This is my code on game update (the camera default follow code is disabled): game.camera.x = Math.round(this.player.sprite.x - (game.camera.width / 2)); game.camera.y = Math.round(this.player.sprite.y - (game.camera.height / 2)); game.camera.bounds = new Phaser.Rectangle(this.player.sprite.x + (game.camera.width / 2), this.player.sprite.y + (game.camera.height / 2), , ); Can anyone have any tips? Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted March 30, 2016 Share Posted March 30, 2016 Use camera deadzone Link to comment Share on other sites More sharing options...
PRSoluções Posted March 30, 2016 Author Share Posted March 30, 2016 I used it: game.camera.deadzone = new Phaser.Rectangle(100, 100, 600, 400); But the problem still. Link to comment Share on other sites More sharing options...
Recommended Posts