Hello everyone!
I construct several actors, I place them on my world at random points, then I want to check if they are touching any other actors previously placed on the world. and if so, I want to move them until they are no longer touching anything else. This is the method I wrote in all my actor classes, and I call it from my world, right after any addObject that I do:
public void myCheckTouch() {
while (getOneIntersectingObject(null) != null) {
move(1);
}
}
The "while" line of code throws a NullPointerException. Why?

