Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by ArcadeHype

Does anyone know of a way to remove projectiles such as bullets after they have passed beyond the boundaries of the player camera?

1 decade ago by KenD

Check the projectile's position against the game screen. In your projectile's update method:

	if (this.pos.x < ig.game.screen.x || this.pos.x > ig.game.screen.x + ig.system.width)
	{
		this.kill();
	}

1 decade ago by ArcadeHype

you know, i was trying that actually and stupid me i forgot to put this.parent() right after it in my update method so my bullets we're staying frozen on the screen, lol.

Thanks man.
Page 1 of 1
« first « previous next › last »