GLSL shadows

Hi guys,

I’m having a bit of an issue with shadows; they mostly work now (new computer! :smiley: ), and when I move the spot lamp to the other side of an object, the shadows are correctly displayed in the viewport. However, when I start the game engine, they disappear. The shadows do work when the spot lamp is on the correct side.

So, why does this happen? (I’m fairly new to GLSL; sorry if this is a :rolleyes: question…)

Here’s the Blend file, and thanks in advance for your help.

Hey, how you doin’?

You are using out-of-GE constraints, the object track you are using is in the non-GE constraints. When you start the Game Engine, the constraint becomes void. You need to use logic bricks. I will upload a fixed .blend.

I hope you understand my explanation.


Shadows-RealTime.blend (518 KB)

Thanks a lot, I think I understand it. So it wasn’t displaying the shadows because of the track to constraint on the lamp, but if I had removed that it (or used Track To), it would’ve worked correctly.

This would also explain why the lamp would seemingly jump out of position sometimes when I started the game engine.

Would this be correct?

Thanks again,


The lamp is rendering the light and shadow, it’s just that the spot light is facing in the direction it would if there was no constraint. Which is why it does, because the Game Engine doesn’t recognise that there is a constraint.