Hi,
I have an object which shall turnTowards my Snowman class.
I've searched in the web and found this code:
I don't know why, but the second line gives me a NullPointerException. Isn't the world able to find my Snowman?
Or maybe you guys know an other way to get the reference of my Snowman, because that would solve the problem too. But it's not easy, because the objects don't intersect each other..
BossLevel bosslevel = (BossLevel) getWorld(); Snowman snowman = (Snowman) bosslevel.getObjects(Snowman.class).get(0); turnTowards(snowman.getX(), snowman.getY());