welcome to linkAR technical documentation

next

previous

Lightning

7.1- Lights

We can load several lights and decide for each model which lights should affect which worlds:

/** Set Sky Model to not be affected by those lights*/
gl3DEngine.setAffectedByLights(skyModelID, false, true);
 
/** Set Buttons Model to not be affected by those lights*/
gl3DEngine.setAffectedByLights(buttonsModelRootID, false, true);

Remember these functions can only be applied to Mesh objects, additional info here.

In this scene, we want the lights to apply only to the main scene model. Note that if you do not add those function calls, the sky and the buttons will be affected by lights. However, since those lights are not pointing at them, sky and buttons will look dark.