Hello,
I face an issue when cloning a mesh in the following case:
- source mesh has a skeleton
- source mesh skeleton has
needInitialSkinMatrix
set to true - cloning happens with some delay (I mimicked it with a
setTimeout
).
Cloning then fails with a “Cannot read properties of null” error which happens because the root matrix isn’t properly retrieved, because the skeleton’s _currentRenderId
equals currentRenderId
of the scene.
Here’s a Playground (note that the skeleton has "needInitialSkinMatrix": true
and that cloning happens within a setTimeout
)
There was a similar issue resolved some time ago: Meshes with skeletons that have needInitialSkinMatrix=true crash when cloned. But example from that topic also fails, if setTimeout
is added: PG.
Thank you.
P.S. Setting needInitialSkinMatrix
to false helps solve this particular error, but I don’t know for sure that it doesn’t cause other issues yet.