Hello, I have an actor that is support to teleport to a different location as soon as its x position reaches a certain value. But for some reason, the program is giving me this exception:
java.lang.IndexOutOfBoundsException: X is out of bounds. It was: 485 and it should have been smaller than: 37
What does this mean and how can I solve it?
My actor's dimensions are: 37 x 42
if (getX() == 927) { setLocation(44, getY()); } else if (getX() == 44) { setLocation(927, getY()); }