Children mesh does not show

Composing objects that way in code is in general no good approach. It’s much better to author and compose the objects in a DCC tool like Blender and then just export a single glTF asset.

Notice that you can define names for your 3D objects. It’s then possible to select these objects like so:

var object = gltf.scene.getObjectByName( 'myObject' );

In this way, you can select individual components and manipulate them. But the big advantage is that the initial transformations and hierarchy of the objects are correct (since you author this in Blender).

When reading your code, I have noticed two things:

  • There is no need to create multiple instances of GLTFLoader. You can load all three assets with just one loader.
  • You trigger the loads without order. That means you will run into race conditions since sometimes the meshtalon object (the parent object) will be undefined since the other parts were loaded first. You can only fix this by loading the plane body first and then trigger the loading process of the other parts. This whole issue can be completely avoid if you just load a single asset like mentioned above.
1 Like