mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 01:49:07 -07:00
fix LOD
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user