How can you set the Rotation of an object depending on the current position of the mouse?


MouseInfo m = getWorld().getMouseInfo(); if(m != null) { int x = m.getX() - getX(); int y = m.getY() - getY(); double r = Math.toDegrees(Math.atan2(x, y)); setRotation(-(int) r); }