Hello again everyone!
It seems that as soon as one problem is solved a new one arises!
I could start a new thread, but this issue is connected to what we’ve been discussing here.
I was working with the code that @gbz provided to animate the child meshes of cloned parent meshes (HERE), and this definitely works, but it seems to apply to ALL of the child submeshes. Using this code, I’m not sure how to animate multiple cloned child submesh types separately. For instance, submesh type 1, submesh type 2, submesh type 3 are all children of the parent mesh, but each has a different function for their animation.
The code above from @gbz calls the parent array (characterBoxA), so my solution was to try and create an array for each of the submesh clones, but I ran into an issue. When BabylonJS clones a parent (“characterboxAclone0”), the child clone (“BoxB”) has this name format: characterboxAclone0.boxB. When I tried to create an array with this format, I get “characterboxAclone0 is not defined.”
In summary, here are the questions:
-
Will creating a unique array for each submesh work (like it did for ALL submeshes in the example above)?
-
If the automatically-generated names assigned by the clone function aren’t in a valid format, how can an array be created for them?