createDefaultEnvironment and light.intensity Question

hello all:
i am stydying SpotLight . I want to use day and night scene switching in my project . I have used createdefaultenvironment, which makes me set light Intensity = 0 can not simulate the effect of turning the scene into night
Now,After using createdefaultenvironment, how can I turn the scene into the effect of night?

this my code:

Using createdefaultenvironment:

Do not use createdefaultenvironment:

Heya, could try setting the environmentIntensity to 0 for nighttime (or some small value). :slight_smile:

scene.environmentIntensity = 0;

Thanks for you , this solves my problem, so nice :smiling_face:

1 Like