Page 1 of 1

Change Position of Light

Posted: 09 Feb 2015, 16:56
by MikeD
Hi,

what is like the best way to change the position of the light source(s)?

I'm using either

Code: Select all

F3DN.Navigator3D.Lights[0].Position.Translate(vec4f);
or

Code: Select all

F3DN.Navigator3D.Lights[0].Translate(80, 80, 80);
but nothing seems to happen. Not even when I change those values for all light sources.
Whereas changing the color of the light works perferctly fine with the following line

Code: Select all

diffColor.SetColor(0, 0, 120);
F3DN.Navigator3D.Light[0].Diffuse := diffcolor
Any ideas why?

Re: Change Position of Light

Posted: 10 Feb 2015, 19:27
by support
Hello Mike,

The position of the light source(s) isn't changed because it is set each time when the F3DN.Navigator3D.GLDCScene.Position.OnNotifyChange event fires. You may try to suppress this behaviour by using some custom OnNotifyChange event handler.


Mikhail