diff --git a/src/box2dLight/DirectionalLight.java b/src/box2dLight/DirectionalLight.java index 592542d..11933d3 100644 --- a/src/box2dLight/DirectionalLight.java +++ b/src/box2dLight/DirectionalLight.java @@ -304,7 +304,7 @@ protected void updateDynamicShadowMeshes() { segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; segments[size++] = tmpEnd.x; @@ -328,7 +328,7 @@ protected void updateDynamicShadowMeshes() { tmpStart.set(center).add(tmpVec); segments[size++] = tmpStart.x; segments[size++] = tmpStart.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; tmpEnd.set(tmpStart).sub(lstart).limit(l).add(tmpStart); @@ -347,7 +347,7 @@ protected void updateDynamicShadowMeshes() { segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; tmpEnd.set(tmpVec).sub(lstart).limit(l).add(tmpVec); @@ -360,8 +360,8 @@ protected void updateDynamicShadowMeshes() { tmpVec.set(fixture.getBody().getWorldPoint(tmpVec)); segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; - segments[size++] = 1f; + segments[size++] = zeroColorBits; + segments[size++] = f; tmpEnd.set(tmpVec).sub(lstart).limit(l).add(tmpVec); segments[size++] = tmpEnd.x; @@ -428,7 +428,8 @@ public void setHeight(float degrees) { if (degrees > 180f) { height = -1f; } - else if (degrees != 90f) height = Math.abs(degrees - 90f); + else if (degrees > 90f) height = degrees - 90f; + else height = degrees; } } diff --git a/src/box2dLight/PointLight.java b/src/box2dLight/PointLight.java index e63722f..0eddc60 100644 --- a/src/box2dLight/PointLight.java +++ b/src/box2dLight/PointLight.java @@ -176,7 +176,7 @@ protected void updateDynamicShadowMeshes() { segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; segments[size++] = tmpEnd.x; @@ -200,7 +200,7 @@ protected void updateDynamicShadowMeshes() { tmpStart.set(center).add(tmpVec); segments[size++] = tmpStart.x; segments[size++] = tmpStart.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; tmpEnd.set(tmpStart).sub(start).limit(l).add(tmpStart); @@ -221,7 +221,7 @@ protected void updateDynamicShadowMeshes() { segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; tmpEnd.set(tmpVec).sub(start).limit(l).add(tmpVec); @@ -237,7 +237,7 @@ protected void updateDynamicShadowMeshes() { segments[size++] = tmpVec.x; segments[size++] = tmpVec.y; - segments[size++] = colBits; + segments[size++] = zeroColorBits; segments[size++] = f; tmpEnd.set(tmpVec).sub(start).limit(l).add(tmpVec);