I’m trying to detach a node that contains all elements from a level and then attach the level 2 node. Right now I’m detaching the collision shapes withouth a problem, but for some reason the models/spatials themselves attached in the level 1 node, which I supossedly already detached from the rootNode, are still appearing/glitching “inside” the level 2 node elements. Thanks for any help
detach will remove them. So either you aren’t really detaching all of them or you aren’t detaching what you think you are detaching… or rootNode was not really their parent.
Try level2.removeFromParent(). It at least eliminates one of those possibilities.
I can assure you that if the parameters are correct to a detach that the thing really will get attached.
Well, level2.getParent() returns the Root Node, so from what you said it should be dettaching the whole level, and pretty sure all the spatials, nodes, etc, are also attached to level2 node as well. I’m so confused by this :S
@DualHunter said:
Well, level2.getParent() returns the Root Node, so from what you said it should be dettaching the whole level, and pretty sure all the spatials, nodes, etc, are also attached to level2 node as well. I'm so confused by this :S
Simple to check. Remove it and the print rootNode’s children.
…if it’s not in there then it’s not getting rendered.
@pspeed said:
Simple to check. Remove it and the print rootNode's children.
…if it’s not in there then it’s not getting rendered.
Does null (node) count as anything? Because I’m getting that, which I think is like the “space” left after dettaching the level 2 node, and a bunch of other AudioNodes. Before dettaching the level 2 node it returns: null (Node), level2 (Node) and the AudioNodes; then after dettaching it, it only shows: null (Node) and the AudioNodes
null (Node) is just a node that you never gave a name too for whatever reason. Whether it’s an AudioNode or not only you can tell by printing the class. Though I kind of think an AudioNode would already say null (AudionNode).
Probably you want to dump that node’s children also. Or just poke around in the debugger.