Ok @srzerbetto , you’ve found the solution, thanks very much .
But i don’t understand why the shadowGenerator.addShadowCaster(mesh, true) function works and the shadowGenerator.getShadowMap().renderList.push(mesh) does not.
No, i’m sorry @Evgeni_Popov but it does not work, even if I initialise my array.
My PG with shadowGenerator.getShadowMap().renderList.push(mesh)
My PG with shadowGenerator.addShadowCaster(mesh, true)
Anyway, the solution has been found but maybe it’s a bug with the spotlights. I always use the first syntax which works with directional lights and i thought it worked the same way with spotlights.
The difference is that you pass true to addShadowCaster, which will also add all descendants of the mesh to the array, whereas push(mesh) only adds mesh to the array.
An equivalent of addShadowCaster(mesg, true) would be something like shadowGenerator.getShadowMap().renderList.push(mesh, ...mesh.getChildMeshes(false)).