Movable Lights


I'm trying to develop a simple Mesh Viewer that can load models and textures and it has 2 default glsl shaders that can be applied to the model (a normal map shader and a glow shader).

What I'd like to know is if there's a way to create lights and then make them visible as a geometry so the user can pick them and then move them around to see the different effects of different types of light (just like a level editor) at different position (for spot light and point light).

My idea is  that when the user creates a light the editor also creates a box (or a sphere). Then, the box passes its coordinates to the light coodrinates so when the user picks the box and moves it, the light follows the movements of the box.

I don't know if it's the right solution or there's a better way to make lights visible so I can pick them directly.

If you know an alternative, please let me know.


You can use a LightNode and then attach the geometry to it; also there are some jME tests where they have spheres floating to indicate lights.

Thanks Momoko, as soon as I'll have some spare time I'll try what you have suggested.