Sun in the wrong place...
by Kevin Johnson · in Torque Game Engine · 03/07/2004 (3:34 pm) · 7 replies
Whats goin on.. i have taken the sky definitions and stuff from the example.fps.. but obviuosly my shadows arent working right..what am i doing wrong?


#2
03/07/2004 (3:56 pm)
Yah .. this is when i come in the map...the shadow on the player is correct but the geomety shadows are all wrong..i have put NO lights into the scene..
#3
03/07/2004 (4:02 pm)
Try going into the mission editor and Edit->Relight Scene
#4
http://www.garagegames.com/mg/forums/result.thread.php?qt=10025
i did what it said and recompiled still no dice..
03/07/2004 (4:09 pm)
Ok i found something in the bugs section on this http://www.garagegames.com/mg/forums/result.thread.php?qt=10025
i did what it said and recompiled still no dice..
#5
03/07/2004 (10:26 pm)
I've noticed a similar problem in my own projects, which means at some point I'll probably be taking a look at this... don't hold your breath though. :)
#6
At base.cc
For this to work you must be using the engine version (HEAD works) that calculates the mDirection of the Sun from the azimuth and elevation, check out your sun.cc.
03/10/2004 (4:00 pm)
This is working for me:At base.cc
VectorF lightDir(0.57f,0.57f,-0.57f);
// Do we have any lights?
if ( gClientSceneGraph->getLightManager()->getNumLights() > 0 )
{
// Yes, so fetch sunlight ( always first light ).
LightInfo sunLight = gClientSceneGraph->getLightManager()->getLight(0);
lightDir = sunLight.mDirection;
}
// Normalise light direction.
lightDir.normalize();
...For this to work you must be using the engine version (HEAD works) that calculates the mDirection of the Sun from the azimuth and elevation, check out your sun.cc.
#7
03/10/2004 (7:35 pm)
YES! This plus the scene fix patch did the trick..thanx guys!!
Torque Owner John Bellone