Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
I have one question?

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?


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:


Posted by: (you are not logged in)


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