public void move(double distance) { double rotation = Math.toRadians(getRotation()); distance *= getWorld().getCellSize(); //You can remove this if your cell size is 1. int x = getX() + (int)Math.round(Math.cos(rotation)*distance), y = getY() + (int)Math.round(Math.sin(rotation)*distance); setLocation(x, y); }