Faild to generate shadows

Hi
I tried to generate shadows on the ground in my scene but failed. Here 's a repo:
https://playground.babylonjs.com/#IFYDRS#195
Hope for some suggestions, thank you in advance! :slightly_smiling_face:

Your scene is not loaded yet when calling scene.getMeshByName("Box001"), so it returns undefined/null:

https://playground.babylonjs.com/#IFYDRS#196

You need to set a bigger intensity to the point light for it to have an effect on the other. However, for this scene, you should use the directional light to cast shadows, it’s more natural (directional light = sun) and less taxing on performance:

https://playground.babylonjs.com/#IFYDRS#197

2 Likes

Thank you so much!!! :smiley: