Hi,
Here I m facing while adding shadow to dynamic import object. when I add the object to mesh the shadow is fine with the latest object only the rest of the previous objects lose their shadow,
Here in the below code is working in a click function ,
dude is a new import object adding dynamically to the scene. ( the id and name is unique for each new import mesh object )
dude.receiveShadows = true;
shadow3d = new BABYLON.ShadowGenerator(1024, SPlight_B);
shadow3d.addShadowCaster(dude);