Well, the Mesh
class extends AbstractMesh
, which extends TransformNode
. So, meshes are themselves transform nodes. Getting both the meshes and the other nodes from getChildTransformNodes
is the expected behavior. It’s a more inclusive function.
getChildMeshes
, on the other hand, returns exclusively the children who are meshes, excluding all other transform nodes. So in this case, it only returns PlaneMesh0
and PlaneMesh
.
If you want to get only the non-mesh transform nodes, you could call:
getChildTransformNodes(false).filter(node => !(node instanceof BABYLON.AbstractMesh));```
This will filter the array, removing any node which is an instance of AbstractMesh.