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!
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:
2 Likes
Thank you so much!!!