Problem with Light

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rewb0rn
Posts: 15
Joined: Thu May 25, 2006 9:26 pm
Location: Berlin, Germany

Problem with Light

Post by rewb0rn »

Hi,

I am lighting a bsp map with a normal Irrlicht light node which works, but I want the light to have the same position as the camera, so I added the light as a child of the camera. But the position of the light does just not change (is this normal? I thought in Irrlicht object positions are always relative to parents). So I added
PlayerLight->setPosition(PlayerLight->getParent()->getPosition());
to my move function that is executed every frame, but that makes the light to change position a very strange way, its not the position of the camera, apparantly.
Additionally the light is very dark allthough i set the lights to maximum, is there a way to change that? And I would like to use Additive Blending AND my own lights on the bsp Map but it seems like Irrlicht is not supposed to support this, am I wrong?

Ty!
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

show some code please
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

8) see this code it some how make a node moves with the camera and with the direction
here
rewb0rn
Posts: 15
Joined: Thu May 25, 2006 9:26 pm
Location: Berlin, Germany

Post by rewb0rn »

Ok it seems like it has nothing to do with my code. When I add the Light as a child of my Camera it works when I set the material type of the map to EMT_SOLID, but for all other types I experience problems. The LIGHTMAP_LIGHTING Types seem to work, though the light is static (it wont move its position, as described above) and LIGHTMAP_ADD wont work with dynamic lights. Has anyone solved the problem for his own use yet?
Post Reply