My DirectionalLight shadow is broken, but why?

I started to making a city in three.js, but i got problem. I added DirectionalLight to my scene, but shadows are casting only at about 1/4 of city, and I don’t know why.
Can You help me?

And by the way, next time I’m going to make car going aroud the city, is this possible to load model .glft, and make it going from point (X,Y,Z) to another point (X,Y,Z) in straight line of course.

Thank You very much

Probably the frustum of the light’s internal shadow camera is too tight. Have a look at the following example that shows how to configure the mentioned frustum. Relevant code section:

Keep in mind that the frustum should be as tight as possible in order to achieve good shadow quality.

Related: Explain the property of

1 Like

Yes. You can animate the position attribute by yourself or use an animation library like tween.js. It is used in several examples in three.js (e.g. three.js css3d - periodic table).

1 Like