here is my code:
here is my problem:
I want the player to remove Cobble if the player is intersecting PressurePlate.class but I couldn't figure out why it doesn't work. if I put cobble into the getWorld().removeObject(cobble); it doesn't do anything but if I put getWorld().removeObject(this); it is removing the player which isn't obviously what in want.
I'd appreciate any help!
Thanks!
public void remove() { Actor cobble = getOneIntersectingObject(Cobble.class); if(getOneIntersectingObject(PressurePlate.class) !=null) { getWorld().removeObject(cobble); } }