Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Strange problem

falcon12
Registered User
Quote
2019-03-23 20:23:30

Without the commented (//) line this recursive tree's node search function works well and find all scenes nodes. with it, CC says ("bad node name") and stop !

TableauBoutons =[];
RecuperePosition = function(nom_objet)
{
var count = ccbGetSceneNodeChildCount(nom_objet);

if (count>0)
{
for(var i=0; i<count; ++i)
{
var child = ccbGetChildSceneNode(nom_objet, i);
var s = ccbGetSceneNodeProperty(child, "Name");

if (s.substr(0,6)=="bouton")
{
// TableauBoutons.push(s);
}
RecuperePosition(child );
}
}
}

var root = ccbGetRootSceneNode();
RecuperePosition(root);


audreyspency
Registered User
Quote
2019-03-25 02:50:43

thank you so much thats helped me alot


xanimalkingx
Registered User
Quote
2019-03-25 15:47:17

I do have a working recursive scene node function but its part of my dependencies file, which the function depends on other functions which also depend on others so... copying and pasting the function here wouldn't do any good. Since my dependencies file is supposed to release with my Enhanced FPS Camera, I can't release it here right now, sorry.


falcon12
Registered User
Quote
2019-03-25 21:17:40

I'm happy it helps you Audrey. It was the first time I wrote a recursive function in 30 years programming !

xanimalkingx thanck you, and don't worry, now it works .. And I don't know why it didn't work before !




Create reply:


Posted by: (you are not logged in)


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