src/gecaoji/Gecaoji.java
@@ -151,8 +151,9 @@ double iconHeight = icon.getHeight(null); double maxSide = Math.max(iconWidth, iconHeight); double scaleFactor = worldSize / Math.max(maxSide, MIN_SCALE); // 割草机图标默认朝南,Yaw=0表示正北,需要旋转180度 double rotationRadians = Math.toRadians(headingDegrees + 180); // 车辆图标的车头默认是在屏幕正下方(270度) // headingDegrees已经是计算好的旋转角度(0-360度),直接使用 double rotationRadians = Math.toRadians(headingDegrees); AffineTransform original = g2d.getTransform(); AffineTransform transformed = new AffineTransform(original);