ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator I have one question?
person icon
starx78
Registered User
Quote
2023-04-29 00:59:17

when creating a behavior, how do I add the option to disable if the camera is not active via java script?

person icon
Guest
Guest
Quote
2023-04-29 06:45:43

/*
<behavior jsname="behavior_CamTest" description="Test if Camera Active">
<property name="CamNode" type="scenenode" default="" />
</behavior>
*/

behavior_CamTest = function () { };

behavior_CamTest.prototype.onAnimate = function () {
var test = ccbGetSceneNodeProperty(ccbGetActiveCamera(), "Name");

if (test == ccbGetSceneNodeProperty(this.CamNode, "Name")) {
// Do nothing
} else {
print("Camera not active...")
}
};



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 |