Преглед на файлове

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(){