deleo Posted March 11, 2017 Report Share Posted March 11, 2017 I have a sidescroller world in which the camera always moves to the right at the same pace. It forces the user to move along with it, because the player cannot move outside of the camera bounds. I have tried doing it like this: this.game.world.setBounds(this.game.camera.x, 0, this.game.camera.x + this.camera.width, this.game.height - 60); in my update function and this works well enough for the left side of the camera but not the right. WHen I set the world width to game.camera.width - 1, the camera can no longer move but the bounds do work. Does anybody have an idea of what I am doing wrong?Best regards, Jur Quote Link to comment Share on other sites More sharing options...
samme Posted March 13, 2017 Report Share Posted March 13, 2017 Are you using camera.follow as well? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.