فهرست منبع

Fix spherical light probes always starting at zero (#1440)

When setting the type of a light probe to spherical, previously the center of the area wasn't set to the probe's position.

The code is untested, as I can't currently build the engine, so someone testing it would be welcome.
grizeldi 4 سال پیش
والد
کامیت
69caa65fda
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      jme3-core/src/main/java/com/jme3/light/LightProbe.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/light/LightProbe.java

@@ -231,9 +231,9 @@ public class LightProbe extends Light implements Savable {
                 break;
             case OrientedBox:
                 area = new OrientedBoxProbeArea(new Transform());
-                area.setCenter(position);
                 break;
         }
+        area.setCenter(position);
     }
 
     public AreaType getAreaType(){