I’m having trouble moving an imported model. I’m following the example from Discoverthreejs. When I change the position of any of the bird models, they move fine. However, I’ve added my own giant (and poor) flower model, generated in Blender. For some reason, regardless of the values I have in line 101 of app.js, the flower never changes position. Can anyone explain why?
The problem is that the existing onLoad() function does something which is not valid for all models. It assumes that the asset only consists of a single mesh object. Thus the following code works:
const model = gltf.scene.children[ 0 ];
But this approach fails if the asset is represented by more than a single mesh (which is actually quite common and true for your flower). Hence, this should be your preferred approach: