How to move lights in GE?

Hi, I am a newbie in GE and I have a basic plane with a light in the scene. I tried to move the light using the logic but it didnt work. I also tried to parent the light to a sphere and move the sphere with logic buttons. But everytime the sphere moves but the light doesn’t move. Can anyone tell me how to move the lights when running the game engine? Thank you!

it is probably working, but you just don’t notice it. Try making the lamp a spotlight, and make sure you are in textured mode.

here’s one way, there’s others
Select the lamp
In frame 1, I key - Insert Loc key
In frame 20, move the Sphere, then I key - Insert Loc key
Now add:
Always Sensor -> AND -> IPO Actuator - Sta: 1 End: 20
It should work now…I hope

Also, I think the plane has to have a texture.

I see the light cast on the plane. Also as per OTO’s instructions it looks like I should animate the light by keyframes. Is there a way to move it by controls like mouse/keyboard or physics from the parent object? For example, the famous Bathroom Game Blender scene has a light parented to a sphere and it works fine. But I couldn’t figure it how…any ideas?

You just have to set the Draw Type: to Textured, be sure to enable Game -> Blender GLSL Materials and in Game -> GLSL Material Settings at least Enable Lights, and dont forget to assign materials to every object so you can see the lights in real time…

I included an example .blend, be sure to have the latest version of Blender and that your video card support GLSL, if you see all white probably its time to update your GPU :b

Hope this helps =)


EDIT: Omg, I always forget, use WASD to move the light ^_^"


MovingLight.blend (129 KB)

Thank you very much…it works! Also I will look in detail about the procedure too! Thank you!

You’re welcome :slight_smile:


Quick Question, How do I set the Draw Type to ‘Textured’?

In the lower corner of the 3D view ( when there is View - Select - Object ) you can see a box with Object Mode ( or Edit Mode ), just to its right, there is a tiny box with a cube, click here and you can see the various modes ( Hotkeys are Z, ALT+Z, and SHIFT+Z )…

I suggest you at least read some basic documentation on Blender before starting with the Game Engine ( the interface at least ) :slight_smile:


Oh…I didnt know you meant it in the viewport…i thought its something related to materials…I am using blender for quite a while now :slight_smile:

Ye, it’s that simple after all, is just the viewport shading mode xD

I tough you were a newbie sorry ^_^"