Jump to content

[SOLVED] Materials for child node & parent Node


photo

Recommended Posts

Hello,

 

I wanted to know if I have applied a material "red" to Node A and apply material "green" to Node B and if I make Node B child of Node A, will the materials applied to Node B be overidded with materials of Node A?

 

Below is the pseudo code for it

nodeA.setMaterial("red", "*");

nodeB.setMaterial("green", "*");

nodeA.addChild(nodeB);

 

I want to this because I have another query on WidgetSpriteNode based on this answer

Thanks

Link to comment
Hello,

I wanted to know if I have applied a material "red" to Node A and apply material "green" to Node B and if I make Node B child of Node A, will the materials applied to Node B be overidded with materials of Node A?

Simple answer: no, material hierarchy and node transformation hierarchy are fully independent.

Link to comment
Simple answer: no, material hierarchy and node transformation hierarchy are fully independent.

Thanks for the reply. I had few issue with SpriteNode based on this. Now is cleared

Link to comment
×
×
  • Create New...