Game Development Community

Pb with lights and ShapeBaseImage

by Mathieu · in Torque Game Engine · 12/08/2003 (10:32 am) · 2 replies

See the pb :
www.garagegames.com/mg/forums/result.thread.php?qt=14330


File: game/shapeimage.cc
line : 1858

void ShapeBase::registerLights(LightManager * lightManager, bool lightingScene){   

  //one of the mounted images must have a light source...     
  for (S32 i = 0; i < MaxMountedImages; i++)    {       

    ShapeBaseImageData* imageData = getMountedImage(i);       
    if (imageData != NULL && imageData->lightType != ShapeBaseImageData::NoLight){
           //CC add
           MatrixF tmpmat;          
           getMountTransform(imageData->mountPoint,&tmpmat);
           Point3F TmpLightPos;
           tmpmat.getColumn(3, &TmpLightPos);
           imageData->registerImageLights(lightManager, lightingScene, TmpLightPos, mLightTime);
           //
           //imageData->registerImageLights(lightManager, lightingScene, getRenderPosition(), mLightTime);
      }
   }
}

#1
12/09/2003 (8:24 am)
Working on checking this fix in. Also resolving issue with ShapeBaseImage light scoping.
#2
12/09/2003 (8:55 am)
Right on. Fixed.