Igor Georgiev Posted April 27, 2016 Share Posted April 27, 2016 So I've tried to move the camera outside the world vertically... I have created sprites outside the world set the bounds the following way: startBonus: function() { autoBtnDesk.inputEnabled = false; this.bonusGame = new BonusGameView(this.game); this.bonusGame.createBonusLvl(); this.game.camera.bounds = this.game.world.height * 2; TweenMax.to(this.game.camera, 4, {y:this.game.world.height}); }, And I got the following side-effect after the camera moves to the content bellow the world: So does anyone know why this happens? Is it because I move the camera outside the bounding box? I am afraid to set the world size in boot, cause a lot of stuff have coordinates according to the world. Link to comment Share on other sites More sharing options...
Igor Georgiev Posted April 27, 2016 Author Share Posted April 27, 2016 19 minutes ago, Igor Georgiev said: So I've tried to move the camera outside the world vertically... I have created sprites outside the world set the bounds the following way: startBonus: function() { autoBtnDesk.inputEnabled = false; this.bonusGame = new BonusGameView(this.game); this.bonusGame.createBonusLvl(); this.game.camera.bounds = this.game.world.height * 2; TweenMax.to(this.game.camera, 4, {y:this.game.world.height}); }, And I got the following side-effect after the camera moves to the content bellow the world: So does anyone know why this happens? Is it because I move the camera outside the bounding box? I am afraid to set the world size in boot, cause a lot of stuff have coordinates according to the world. Fixed it by adding a quad with fill for background. I guess any other background would do the trick. Hope it helps for future readers. mattstyles 1 Link to comment Share on other sites More sharing options...
Recommended Posts