I have found a problem in LightPrebaker.as
function setVertexColor(d:Vector3D, n:Vector3D,
colr:int, colg:int,
colb:int):Array
{
var dl:Number;
var factl:Number;
for(j = 0;j<_aLights.length;++j){
dl =
d.subtract(_aLights[j].lightposition).length;
percentFalloff =
(_aLights[j].lightfalloff- dl)/
_aLights[j].lightfalloff;
<-------------------------------> lightFactor =
_aLights[j].lightposition.getAngle(n); <----- lightposition is a
Vector3D?
if(percentFalloff > 0 && dl
<_aLights[j].lightfalloff){
factl =
lightFactor*percentFalloff;
colr += _aLights[j].lightR
*factl;
colg += _aLights[j].lightG
*factl;
colb += _aLights[j].lightB
*factl;
}
}
return [colr, colg, colb];
}
Throws error with getAngle(). Thanks