Does anyone know where the sun is positioned relative to the craft 3D viewport? I’m learning how to adjust the lighting in my scene. Based on the reflections I see on the objects I position at 0,0,0 it seems the scene.sun is projecting from a position in the middle, superior, and behind the 3D viewport (i.e. x=0, y = + value, z = - value in 3D world terms). I see that I can then rotate the sunlight coming from the sun (e.g. scene.sun.eulerAngles = vec3(45,0,0)) although for some reason it doesn’t look like I can rotate the sun along the y axis (the lighting and reflection don’t see to change when I change the y component of the eulerAngle).
@SugarRay Try this. If you change the yy slider, nothing seems to happen. If you change either the xx or zz slider from 0, then the reflection will change when you move the yy slider.
assert(OrbitViewer, "Please include Cameras (not Camera) as a dependency")
scene = craft.scene()
v=scene.camera:add(OrbitViewer, vec3(0,0,0), 50, 0, 300)
sphere1.model = craft.model.icosphere(5,3)
sphere1.material = craft.material(asset.builtin.Materials.Specular)
Thanks, @dave1707, very nice example! I do see that once x or z changes then you can rotate the sunlight using the y axis. Not sure I understand “y” but that helps me plan the sunlight in my seen better.