I am trying to eat a actor but it is only eating when the cookie is being eating by the 'granny' but only when it passes through the middle. this is the code i have been using and i am not sure how to fix it
public void eat() { Actor coookie; coookie = getOneObjectAtOffset(0, 0, coookie.class); if (coookie !=null) { World world; world = getWorld(); world.removeObject(coookie); } }