The following code should have my actor circling around a Center as long as it's in range, and moving in a straight line otherwise:
For some reason, it is never turning, even when it's extremely close to or even on top of a Center. I tried getObjectsInRange(Integer.MAX_VALUE, Center.class), which should pick up the center in any reasonable situation, but it doesn't. I'm afraid I might be overlooking something obvious.
public void act()
{
List<Center> centers = getObjectsInRange(1200, Center.class);
for(Center c : centers)
{
turnTowards(c.getX(), c.getY());
turn(90);
}
move(1);
}
