使用THREE.JS,我当前正在使用SpotLight。 我有一个MeshLambertMaterial(4个女孩),应该为(Mansion)后面的图片蒙上阴影,但不确定为什么不是。
到目前为止,我的代码备受关注
let spotLight = new THREE.SpotLight( 0xFFFFFF, 1);
spotLight.castShadow = true;
spotLight.position.set( 10, 5, 100 );
spotLight.target.position.set(0, 5, 0);
spotLight.shadowCameraNear = 20;
spotLight.shadowCameraFov = 30;
spotLight.shadowBias = 0.0001;
spotLight.shadowCameraVisible = true;
scene.add( spotLight );
答案 0 :(得分:2)
在“ 4个女孩”对象上,设置.castShadow = true;然后在您的豪宅图片上设置.receiveShadow = true;