Closed vytran0710 closed 1 month ago
You should try to load your model in advance before setting it on the Anchor, maybe load it in onCreate
and use it like this
private fun loadModel() {
lifecycleScope.launch {
sceneView.modelLoader.loadModelInstance("models/model.glb")?.let {
model = it
}
}
}
private fun createNode(anchor: Anchor) {
val anchorNode = AnchorNode(
engine = engine,
anchor = anchor
)
anchorNode.addChildNode(
ModelNode(
modelInstance = model
)
)
}
Hi akhatriST,
Thanks for the reply I think there is a problem with the texture of my model, I loaded it without texture and then load it with color and it works
Configuration and codes:
ARSceneView is placed in a fragment
Steps to reproduce: