ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator Change AMBIENT LIGHT of the root node
person icon
b3_studio
Registered User
Quote
2024-07-24 07:32:51

Hi guys, I'm having a problem, can I change the ambient light of the root node through a variable?

person icon
Guest
Guest
Quote
2024-07-24 08:11:00

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;


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |