Ignore:
Timestamp:
06/05/07 14:27:14 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h

    r2405 r2411  
    6060           t += dt; 
    6161 
    62            //blueLight->setDirection(sin(t),sin(t),cos(t)); 
    63            blueLight->getParentSceneNode()->setPosition(30 * sin(t), 1, 30 * cos(t)); 
     62           Vector3 pos(30 * sin(t), 1, 30 * cos(t)); 
     63           blueLight->getParentSceneNode()->setPosition(pos); 
     64           Vector3 dir = pos; 
     65           dir.normalise(); 
     66           blueLight->setDirection(dir); 
     67           
    6468           
    6569        return result;      
     
    278282*/ 
    279283                blueLight = mSceneMgr->createLight("BlueLight"); 
    280                 blueLight->setType(Light::LT_POINT); 
     284                blueLight->setType(Light::LT_SPOTLIGHT); 
    281285                blueLight->setCastShadows(true); 
    282286        blueLight->setDiffuseColour(ColourValue(1,1,1,1)); 
     
    288292                blueLight->setPowerScale(200); 
    289293        //      blueLight->setDirection(1, 0, 0); 
    290         //      blueLight->setSpotlightOuterAngle(Radian(Degree(90))); 
    291                 blueLight->setAttenuation(200, 0, 0, 1); 
     294                blueLight->setSpotlightOuterAngle(Radian(Degree(90))); 
     295                blueLight->setSpotlightFalloff(1); 
     296                blueLight->setAttenuation(2000, 0, 0, 1); 
    292297                blueLightNode->attachObject(blueLight);          
    293298 
Note: See TracChangeset for help on using the changeset viewer.