Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi guys, I'm having a problem, can I change the ambient light of the root node through a variable? |
||||
|
Use ccbSetSceneNodeProperty(). You can use a variable to do it. Make it an object. Something like: var color = {r: 255, g: 0, b: 0}; ccbSetSceneNodeProperty(ccbGetRootSceneNode(), "AmbientLight", color.r, color.g, color.b); Need to do this in an Execute JS action. You can change the properties by doing: color.r = 128; |
|