Hello,
How can I set shadow for objects
For example, if I have a Cube, it should both accept a shadow and give a shadow, but now it can only give a shadow.
I need to configure it as both a shadow source and a shadow receiver
// box
var box = BABYLON.Mesh.CreateBox("box", 4, scene);
box.position.y = 2;
box.position.z = -2;
box.position.x = -7;
box.material = new BABYLON.StandardMaterial("box", scene);
box.material.emissiveTexture = new BABYLON.Texture("assets/textures/weathered_brown_planks_diff_2k.jpg", scene);
box.material.specularColor = new BABYLON.Color3(0.04, 0.04, 0.04);
box.receiveShadows = true;
box.castShadow = true;
shadowGenerator.addShadowCaster(box);