How can I add my object loaded with a SceneLoader
to a layer?
In my QML project, I'm applying a layer filter, and showing certain things on some layers, others on other layers, etc...
I can add a mesh to a layer with:
Mesh {
id: barrel
source: "qrc:/assets/metalbarrel/metal_barrel.obj"
}
Q3D.Entity {
id: barrelEntity
components: [ solidLayer, barrel, barrelTransform]
}
But I can't figure out how to do the same with something loaded with SceneLoader
, which I need because I want to use a 3ds (transformed with qgtfl
) object.
e.g.
SceneLoader {
id: ship
source: "qrc:/models/Ship_meteor_N010311.qgltf"
}
Q3D.Entity {
id: barrelEntity
components: [ solidLayer, ship ]
}
won't work, nor has any other permutation that I've tried so far. (Defining it in the layer, defining it in the LayerFilter
, wrapping it with an entity, putting the SceneLoader
in the entity with the components, etc)