Faizy Posted May 11, 2017 Share Posted May 11, 2017 Edit: found the solution, I had a callback when an enemie is out of bounds which killed it. Well, my question now is: is there a possible way to only check if the object is out of bounds on a specific site? Something like: enemy.events.onOutOfBoundsLeft.add(removeFromGroup, this); Hey, I want to create an enemy outside the worldbounds. The enemys position will get the velocity property: enemy.body.velocity.x = -500; so it will move from the right to the left. It all works fine, however I´m unable to create something like this(first parameter) and I think it´s due to the enemy would be outside the right bound. this.enemy = game.add.sprite(game.width + 100, y, sprite) Is there a solution to it? Link to comment Share on other sites More sharing options...
Recommended Posts