Chupup Games Posted March 14, 2014 Share Posted March 14, 2014 I want the group members get killed, when they leave the screen,but 'outOfBoundsKill' doesn't seem to work. (Phaser 2.0) I made a console.log and saw that the members don't get killed even if they leave the screen boundarythis.blocks = game.add.group(); this.blocks.createMultiple(20, 'tiles', 2); game.physics.enable(this.blocks, Phaser.Physics.ARCADE); this.blocks.setAll('outOfBoundsKill', true); Link to comment Share on other sites More sharing options...
rich Posted March 14, 2014 Share Posted March 14, 2014 From the Migration Guide: "By default Sprites no longer check if they are within the world bounds. It's quite an expensive process (calling getBounds every frame), so you have to enable directly." This possibly? joerrey 1 Link to comment Share on other sites More sharing options...
Chupup Games Posted March 14, 2014 Author Share Posted March 14, 2014 Thanks! I used checkWorldBounds = true; and it works now! Link to comment Share on other sites More sharing options...
rich Posted March 14, 2014 Share Posted March 14, 2014 Nice. It's quite an expensive call, so if you can do it another way that would be better. But it works and if you don't have loads of sprites it will be fine. Link to comment Share on other sites More sharing options...
Recommended Posts