Is there a DirectionalLightShadow helper, or way to see the shadow's bounds?

Viewed 42

I have a DirectionalLight with shadow working; however, it's difficult to tell where the shadow's boundaries are on the whole (it's easy to tell when I've crossed a boundary with my game character!)

Is there a way to visualize where the bounds are? A helper of some kind, perhaps?

1 Answers

Is there a way to visualize where the bounds are? A helper of some kind, perhaps?

Yes. You can visualize the shadow camera by using CameraHelper. Try it like so:

const helper = new THREE.CameraHelper( light.shadow.camera )
scene.add( helper );
Related