I am new to Greenfoot and need help getting an item to disappear when it hits the edge of the world. Right now when it gets to the edge, I get an "Actor not in world error" and don't know why.
Am trying this for my "bullet" object:
if ( atWorldEdge() )
{
getWorld().removeObject(this);
}
but it is not working. Any help or ideas are appreciated!