How to get a set of Spatials together in one package?

Hi,

if i have for example my terrain and skybox … i want to have them in like one package … and i dont know the common way to do this.



My try is to extend Node an in that class Level extends node i just add the sky and terrain as children in the init() method …



so i get something like



LevelNode level = new LevelNode("lalal");

//… some methods like myCustomInit from levelnode

//…

root.attachChild(level);



but i dont know if that is a good style … i just dont want to have every object in the same node …

the other example is, that i have an HUDNode that will handle all hud stuff (Textobjects and so on) …





i would really love to see your way to manage spatials that belong together and how do you combine them to one class.

Hi ben,



i do it the same way. also i don't know if its good style.



I sort all my stuff down a the tree.





sceneNode contains objects like boxes or other spatials

worldNode contains terrain, skybox, clouds and sceneNode



rootNode gets worldNode as child



the hud and some debug infos reside under the statNode



regards

damadmax