Just a quick question. I want to have an object, say spawn marker, rendered in the scenecomposer but want it removed when the game is run. I’ve tried coding a rendercontrol which detaches the object, but doing so also removes it from the scenecomposer. What to do?
Should I traverse the scene to find all spawn markers and remove them that way (or just hard code the positions)?
Well your application needs to know about context for this.
Add a launch parameter, eg “devmode”, and only attach your stuff if you get this.
Do it the other way around, make your markers just nodes with a special UserData and then have an AppState that you attach to the SceneComposer scene which displays the actual markers where the nodes are. Just attach them to the rootNode of the SceneComposer instead of the model node, then you only see them in the composer but don’t save them in the j3o.
Personally I just remove the marker when the model is loaded, replacing it with whatever is supposed to sit there because of the marker. You’ll have to traverse the scenegraph to get them anyway, else what use are markers when you don’t know where they are?