EDIT : I take back everything I just typed. The Matrix IS taking lighting from my light. BUT, objects are sending a bad type of shadowing. I was totally at a loss about this until now. Thanks for this thread.. LOL
In the picture above, the small box above is sending out light and the box below is casting the shadow based on that box above. The box above is just there to show you where the light is coming from.
Here is an example code that works for me.
` This code was downloaded from The Game Creators
` It is reproduced here with full permission
` http://www.thegamecreators.com
sync on
autocam off
rem Floor
make object cube 100,10
color object 100,rgb(255,255,255)
position object 100,0,-3,5
scale object 100,300,50,300
set ambient light 10
set point light 0,0,20,0
rem Shadow Caster
make object cube 101,5
position object 101,0,5,5
rem Light object
make object cube 102,1
position object 102,0,20,5
set normalization on
set shadow shading on 101
set object light 102, 1
rem Position Variables
xpos#=0
zpos#=0
rotx#=0
rem Camera
make camera 1000
position camera 1000,0,30,30
point camera 1000,0,0,0
do
if leftkey()=1 then xpos# = xpos# + .1
if rightkey()=1 then xpos# = xpos# - .1
if upkey()=1 then zpos# = zpos# - .1
if downkey()=1 then zpos# = zpos# + .1
if spacekey()=1 then rotx# = rotx#+1
position object 102,xpos#,20,zpos#
position light 0,xpos#,20,zpos#
rotate object 101,0,rotx#,0
sync
loop
so I guess the real problem I am having with the Matrix is how to set the color of the shadow. Because right now, it looks like its bleeding through to my backdrop. Although, changing the backdrop to off or even changing the color of the backdrop didn't change anything in the shadow.
The line : set shadow shading on 101 -- Tells the cube to cast the shadow. You have to set this to each object that you want to cast the shadow with. The Matrix as you can see is receiving the shadow, but as to how to control the color of it yet, I have yet to figure out.
By the way, the Ambient light has no effect on the color of the shadow itself. Only on the objects.
EDIT 2 : THE FOG MADE THE DIFFERENCE !!!
fog on
fog distance 700
fog color rgb(0,0,0)
Which sux because now I have to figure out how to keep the fog in the distance the color I want it and yet still keep the shadows working. Man this is a pain.
"Son, I crap bigger then you !"