//fixed way here

void CLightSceneNode::setLightData(const video::SLight& light)
{
LightData = light;

LightData.Direction.normalize();

//ogles2 need cos(outer cone)
switch(SceneManager->getVideoDriver()->getDriverType())
{
//radians
case video::EDT_OGLES2:
LightData.OuterCone = (float)cos(light.OuterCone * 3.141615926 / 180.0f);
LightData.InnerCone = (float)cos(light.InnerCone * 3.141615926 / 180.0f);
break;

//degrees
default:
break;
}

}

//add whole setRotation function
void CLightSceneNode::setRotation(const core::vector3df& rotation)
{
ISceneNode::RelativeRotation = rotation;
updateAbsolutePosition();

getAbsoluteTransformation().rotateVect(LightData.D irection);
LightData.Direction.normalize();
}

void CLightSceneNode::doLightRecalc()
{
/*if ((LightData.Type == video::ELT_SPOT) || (LightData.Type == video::ELT_DIRECTIONAL))
{
//LightData.Direction = core::vector3df(.0f,.0f,1.0f); //mark here by stone
//getAbsoluteTransformation().rotateVect(LightData.D irection); //mark here
LightData.Direction.normalize();
}*/

if ((LightData.Type == video::ELT_SPOT) || (LightData.Type == video::ELT_POINT))
{
const f32 r = LightData.Radius * LightData.Radius * 0.5f;
BBox.MaxEdge.set( r, r, r );
BBox.MinEdge.set( -r, -r, -r );
//setAutomaticCulling( scene::EAC_BOX );
setAutomaticCulling( scene::EAC_OFF );
LightData.Position = getAbsolutePosition();
}
if (LightData.Type == video::ELT_DIRECTIONAL)
{
BBox.reset( 0, 0, 0 );
setAutomaticCulling( scene::EAC_OFF );
}
}

//////////////////
//here is use way

//use way
SLight spotLightData;
ILightSceneNode* scnode = smgr->addLightSceneNode(0, core::vector3df(0,5,120), video::SColorf(1.0f, 1.0f, 1.0f, 1.0f), 100.0f, -1);


scnode->setRotation(core::vector3df(30,0,0));
spotLightData = scnode->getLightData();

spotLightData.Type = video::ELT_SPOT;

//if add this line will cover setRotation(core::vector3df(30,0,0)); if u set before
spotLightData.Direction = core::vector3df(0,1,1);

spotLightData.Falloff = 60.0f;
spotLightData.OuterCone = 20;

scnode->setLightData(spotLightData);