According to the documentation getChildMeshes accepts a second argument which is a predicate that can be used to filter the child meshes. I can’t get this to work. getChildMeshes returns an empty array even when one of the meshes matches the predicate.
In this PG - Babylon.js Playground you can see that getChildMeshes returns an empty array, but if I check to see if the first child mesh matches the predicate, it does.
I think getChildMeshes might also be returning nodes. In my example, there is a light that is getting evaluated by the predicate. Good to know about getChildren, though. Is there a better way to figure out if a node is a mesh other than instanceof BABYLON.AbstractMesh?