Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
How do you turn Fog On and Off Programmably ?

bracer
Registered User
Quote
2017-07-24 23:41:20

How do you turn Fog On and Off Programmably ?


3dblendsphinx
Registered User
Quote
2017-07-25 01:05:02

You can play with this


//Get The Main Scene Root
var scene=ccbGetRootSceneNode()
//collect Fog information
var fogState=ccbGetSceneNodeProperty(scene,"Fog")

//Check the State of the Fog
if(fogState==false)
{
//Turn Fog On
ccbSetSceneNodeProperty(scene,"Fog",true)
}else
{
//turn Fog Off
ccbSetSceneNodeProperty(scene,"Fog",false)
}





Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (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