frokenstein Posted November 17, 2014 Report Share Posted November 17, 2014 I have a game where the world bounds extend far beyond the screen. I have a sprite set to accelerateToObject() to another sprite. This accelerating sprite is set like so:this.checkWorldBounds = true;this.outOfBoundsKill = true;What I am seeing is really strange. Because the sprite accelerates, it can sometimes fly offscreen. This was anticipated, and isn't an issue. But what I see is when the sprite flies offscreen to the top or the left, it is killed even if it is not outside the world bounds. Even stranger, when it flies off to the right or the bottom, even if it does go outside the world bounds, it does not get killed. Has anyone seen behavior like this? The world is 16000 x 16000. The sprite retracks its target every time update() is called, like so:this.bullets.forEach(function (bullet) {this.game.physics.arcade.accelerateToObject(bullet, this.player, 1000, 1000, 1000);}, this); Quote Link to comment Share on other sites More sharing options...
frokenstein Posted November 21, 2014 Author Report Share Posted November 21, 2014 I decided to check no world bounds at all and just destroy() a bullet once it reaches an "expiration time". 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.