Same light on multiple nodes

Can one add the same light instance to a scenegraph multiple times?



http://i.imgur.com/F2LH7.jpg



I want to have subtree A and B affected by the same light but not subtree C.


  1. Suppose I have a scene graph looking like the image.
  2. I create one instance of com.jme3.light.PointLight



    Can I safely add this light to both A and B without unforeseen problems?

Looking at the code, it should probably work, but no gurantees.

This is actually suggested way to do that. Adding the light to the scene graph is just telling the engine which objects should be affected by it. :wink: