Is it possible to add a different material instance to each side of a basic cube node? #434
Answered
by
johnwhh
wilfredbtan
asked this question in
Q&A
-
I am using the Currently, I am assigning a bitmap generated from a Custom Android View as a texture to the material but I wish to assign a different texture to each side of the cube. Is this possible with this library? If not, could anyone point me in the right direction to implement this? My code is below: Material
Setting the texture of the material
|
Beta Was this translation helpful? Give feedback.
Answered by
johnwhh
Apr 4, 2024
Replies: 1 comment
-
As of version 2.1.0, to assign material instances to faces on a val cubeNode = CubeNode(sceneView.engine)
val primitiveIndex = 0 // This index corresponds to a face on the geometry
cubeNode.setMaterialInstanceAt(primitiveIndex, yourMaterialInstance) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wilfredbtan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of version 2.1.0, to assign material instances to faces on a
CubeNode
you can do the following: