Changing Light Parameters (Such as Attenuation)

Hi all,



I'm trying to make a flickering light in my scene. Actually I thought this would only be a matter of changing the lights (I'm using a spotlight) attenuation. But when I change the attenuation dynamically (after the init routines etc.) no changes seem to be made in my scene. It's probably some kind of update method I forget to call each time I change the light, but I just can't find it. Has anybody got an idea?


I'm newbie too but try to update the render state of the node that contains the geometry to be lighted.

rootNode.updateRenderState();

I'm unsure if this is needed though. Just try.

J

Hi jjmontes,



thanks for your Tip, but that's one of the things I already actually tried. No luck though.

Hello again,



surely somebody must know which part of the system has to manually be updated to change the lights attenuation dynamically? Sorry to push the thread, but it actually is quite important to the work I'm doing here right know. Thanks once again in advance for every answer.

The tool we use at work allows manual attenuation adjustment and I don't recall it being anything special as far as updates, etc.  Perhaps you don't have the light you think you do?

Thanks for you answer. Hm if there isn't anything special to update, I'll probably have to doublecheck my code once again  :expressionless:

can you post your code up