I have one problem when firing bullets with the intention of removing a certain object, but the bullet removes the object way before it even hits the object in question. My code is currently like this ( in the object I want to remove class):
should i code it in a different way? Appreciate all the help
public void die()
{
Actor bullet = getOneIntersectingObject(Bullet.class);
if(bullet != null)
{
getWorld().removeObject(bullet);
getWorld().removeObject(this);
}
}
