I tried this:
dae.castShadow = true;
dae.receiveShadow = true;
scene.add(dae);
//spotLight is defined already.
spotLight.castShadow = true;
renderer.shadowMapEnabled = true;
But the model still does not have shadows? Did I do anything wrong? Please help.
You need to set castShadow
and receiveShadow
to true
for all the objects in the hierarchy.
THREE.SceneUtils.traverseHierarchy( dae, function ( child ) {
child.castShadow = true;
child.receiveShadow = true;
} );