1
votes

I am working with shadows in three.js but I have an issue, that is the shadow is projecting on two faces of a mesh, like this.

enter image description here

the shadow of the "head" of my actor is on two faces of the red polygon, i don't know why, I am using THREE.HemisphereLight and THREE.DirectionalLight also the properties castShadow and receiveShadow

1
See if this post helps you: stackoverflow.com/questions/27070747/…WestLangley

1 Answers

0
votes

See this bug report: https://github.com/mrdoob/three.js/issues/2454

You could break your red bar into 2 objects, one that receives shadows and one that doesn't. Or simply use a different material for each face.

Or adjust the shadow camera box so it doesn't encompass both sides of the red bar. That way you'd control how far the shadow is cast.