Skip to content

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
Discussion options

You must be logged in to vote

As of version 2.1.0, to assign material instances to faces on a CubeNode you can do the following:

val cubeNode = CubeNode(sceneView.engine)
val primitiveIndex = 0  // This index corresponds to a face on the geometry
cubeNode.setMaterialInstanceAt(primitiveIndex, yourMaterialInstance)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wilfredbtan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants