Re: [osg-users] Camera and light problem

2008-03-10 Thread Vincent Bourdier
Hi Jon, If your light is in the model at (0,0,0) it is normal, because in the graph, the position is always relative (depends on the parent node) (if you let it by default). try something like : -ROOT ---lightsource ---tranform --geode In this case light source will be in relative coordinat

[osg-users] Camera and light problem

2008-03-08 Thread Jon
Thanks Vincent for your answer. I tried to follow your suggestion, but the problem persists. If you look at the code, I have : |_root ---|_modelGraph ---|transform -|lightsource -|geode Any suggestions ? What are my mistakes? My goal is to have a model moving with

Re: [osg-users] Camera and light problem

2008-03-06 Thread Vincent Bourdier
Hi Jon If you add your transform to the camera, it is normal that the light follow the camera.. If you want to keep the light at the same position, you have to attach it near the root node, and attach the rest of the scene a lower levels than it. Each child inherit from its parents, so if you at

[osg-users] Camera and light problem

2008-03-05 Thread Jon
Hi all, I have currently a simple model on my scene, and I've added a light to the scene represented by a small sphere. I would like to fix light position and I don't want this one to move with the model (when I move the camera), or to move it independently from the main camera... So I dec