This commit is contained in:
Leonid Gaev
2012-07-10 14:26:27 +06:00
parent 91ae4fe11d
commit 442c9f6098

View File

@@ -225,12 +225,12 @@ package alternativa.engine3d.objects {
// If object needs on light sources.
if (lightsLength > 0 && child.useLights) {
// Calculation of transfer matrices from sources to object.
var excludedLightLength:int = child.excludedLights.length;
var excludedLightLength:int = this.excludedLights.length;
var childLightsLength:int = 0;
for (var i:int = 0; i < lightsLength; i++) {
var light:Light3D = lights[i];
var j:int = 0;
while (j<excludedLightLength && child.excludedLights[j]!=light) j++;
while (j<excludedLightLength && this.excludedLights[j]!=light) j++;
if (j<excludedLightLength) continue;
light.lightToObjectTransform.combine(child.cameraToLocalTransform, light.localToCameraTransform);