Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Change material by java

quintella
Guest
Quote
2020-07-18 15:52:33

Hello everyone,
I'm trying to change the material of an object from transparent to solid, I'm using the code in execute java script when clicking and the material is transparent:

var s = ccbGetSceneNodeFromName ("planeMesh1");
ccbSetSceneNodeMaterialProperty (s, 0, "Solid", true);

But nothing happens, any idea what's wrong ...


count2rfeit
Registered User
Quote
2020-07-19 16:17:42

use this instead..

var s = ccbGetSceneNodeFromName("planeMesh1");
ccbSetSceneNodeMaterialProperty(s, 0, "Type", "Solid");

this should work


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (you are not logged in)


Text:

 

  

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


   






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