소스 검색

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