Page 1 of 1

Light and Shadow

Posted: Mon Sep 22, 2003 11:44 pm
by The Crusher
How i can make 2 shadow from one mesh with 2 lights????
Or can i make that i switch first light off an the second on and then follow the shadow the second light, not the first???

Posted: Tue Sep 23, 2003 6:10 am
by niko
Didn't you read my answer in the other forum?
http://irrlicht.sourceforge.net/phpBB2/ ... .php?t=155
myself wrote:Do it just like you'd do it with on light, but create two lights instead of one.
To make it a little bit clearer: For example in the SpecialFX example, just add another light. You could do this with this code, add it afer you created the first light:

Code: Select all

node = smgr->addLightSceneNode(0, core::vector3df(0,0,0), 
    video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 600.0f);
anim = smgr->createFlyCircleAnimator (core::vector3df(0,100,0),
    200.0f,-0.001f);
node->addAnimator(anim);
anim->drop();
And here is the result: 2 Shadows instead of one:

Image

Posted: Tue Sep 23, 2003 3:02 pm
by The Crusher
Oh sorry i have not look at this i've forgoten that i have this wrote :oops:
But thanks for the answer :D