DirectionalLight position

Feb 23, 2010 at 1:45 PM

Another lighting question.  Added in a DirectionalLight now and everything seems to be working correctly except for the position.  Setting the position property just has no effect.  Is this normal or am I missing something again?

Feb 23, 2010 at 5:46 PM

This is an 'abstraction miss'. A directional light has no logical position, so you're experience correct behavior.



Feb 24, 2010 at 10:21 AM

you can get some effects from the directional light by setting its "direction" although as bryan has pointed out the light doesnt actually move. 

is there anyway to allow a pointlight to cast shadows? or is this not possible?

Feb 25, 2010 at 8:31 AM

Yeah I tried changing the direction and that did seem to change the effect somewhat sensibly, but still not quite what I expected.  I've realised what caused my initial confusion though.  I was thinking of a spot light rather than a directional light.  I now understand that directional lights come from some undefined distant source so the ineffective position property makes perfect sense.  I also changed the shape of the tube model yesterday (from a corner back to a straight) and a lot of the lighting stopped working properly again, so it looks like I've still got issues in the vertex calculations.  I'll have to revisit it in the weekend and look more closely to see if I'm really getting the values I thought I was, and hopefully all these weird lighting issues will vanish in a puff of logic.