I thought I understood container objects but I've run into another
snag.

I have a DirectionalLight3D that I was setting the position of via
rectangular coordinates. This worked fine though I had to convert my
source pitch/yaw angles to x,y,z values.

So I thought I would add another container, put the light inside this,
offset it z direction by an orbit size, and rotate the conatiner x & y
axes to move the light around. This would avoid my angular to
rectangular coversions.

I hit two problems, first just offsetting the light in z direction by
5000 breaks the light! I have to set the x & y values to 1 to fix it,

Second the light doesn't appear to move when I rotate the container.

One thing I am slightly unsure of is the creation order, and why the
camera has to be created before the view. Any good references on this?

Anyway I tried adding the light conatiner to the scene, creating light
and adding it to container - no good.
I tried creatng the light at the same time as the camera and adding to
the view - no good.

Any ideas what I have got wrong now?

Regards
Mark

Reply via email to