Hi everyone.
I’m learning to work with “imported meshes” but I’m running into a problem.
I created a simple scene with light and shadow. They work as expected for built-in meshes.
However, setting receiveShdaows = true
seems to make no effect for imported meshes.
SceneLoader.ImportMeshAsync('', 'path/to/models/', 'plant_celandines.glb', scene)
.then(({ meshes }) => {
const plant = meshes[0];
plant.scaling = new Vector3(5, 5, 5);
plant.receiveShadows = true; // not working
shadowGenerator.addShadowCaster(plant); // this is working
});
The parts of the mesh that are inside the shadows look exactly the same as the parts that are outside the shadows. There is no shadow on its surface.
Playground is here:
Any help would be appreciated. Thanks!