How would I make my entities remove themselves when they leave the camera?
Entities Remove When Off Camera
Draknek
(Draknek)
#2
All Entity objects have a onCamera
property that you can access. So:
public override function update ():void
{
if (! onCamera) {
world.remove(this);
}
}
jacobalbano
(Jacob Albano)
#4
It’s really best if you leave your question intact, no matter how simple the solution turns out to be. The whole reason for making posts viewable to everyone is so that future visitors to the forum can find existing solutions to questions they might have asked.