How to combine multiple node into one
Read my code below here i have 3 3d model i want to combine this into one model
val train1: CompletableFuture<ModelRenderable> = ModelRenderable
.builder()
.setSource(applicationContext, Uri.parse("3d/new/Train_Cabin_01_Go.glb"))
.setIsFilamentGltf(true)
.build()
val train2: CompletableFuture<ModelRenderable> = ModelRenderable
.builder()
.setSource(applicationContext, Uri.parse("3d/new/Train_Cabin_02_Go.glb"))
.setIsFilamentGltf(true)
.build()
val train3: CompletableFuture<ModelRenderable> = ModelRenderable
.builder()
.setSource(applicationContext, Uri.parse("3d/new/Train_Cabin_03_Go.glb"))
.setIsFilamentGltf(true)
.build()
CompletableFuture.allOf(train1,train2,train3)
.handle<Any?> { ok: Void?, ex: Throwable? ->
modelNode = Node()
}
You can add them all in childNodes as a list and they will be all shown in the scene. Something like this, you can see childNodes:
Scene(modifier = Modifier.fillMaxSize(), engine = engine, modelLoader = modelLoader, cameraNode = cameraNode, childNodes = listOf( centerNode, movingObjectNode, ... //add all the 3D models you want ), environment = ..., onFrame = {...})
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.