In the game I’m working on I dynamically add and remove lights from the active layer (because the scene is huge due to me wanting the game to have a completely seamless feel and it helps the frame rate). The light is basically just a simple mesh with a point lamp parented to it. In my main scene I have a series of empty objects which I cycle through, each time adding that lamp object at its position. The call is something like this:
scene.addObject(scene.objectsInactive['Light_White'], currentObject, 0)
This works fine for the first light, the mesh and light are both added to the scene correctly. After that however, only the rest of the meshes are visible and the lamps seem to have no effect on the scene. The lamps are technically in the scene, as I can access them through scene.objects, and read/modify properties etc. but only the first lamp that was added actually illuminates anything. I know they’re in the right place, because I can print their positions to the console.
So all the lamps technically exist, all have the right energy, are all in the right place but are not affecting the scene. I have checked, and they are not set to illuminate only their layer, so shouldn’t they be lighting up the scene?
Is this a settings issue or a limitation that I am not aware of? Thanks in advance!