I've been trying to find a solution but have not found one yet. Here is my code.
public void checkCollision()
{
Actor bee2 = (Actor) getOneIntersectingObject(Bee2.class);
if(bee2 != null)
{
getWorld().removeObject(bee2);
}
if (isTouching(Stinger.class))
{
getWorld().removeObject(this);
return;
}
}
This code causes the bullet to hit the enemy and make it disappear but the bullet continues on traveling until it reaches the end of the world.