T2DSceneGraph
by David Everhart · in Torque X 2D · 12/10/2007 (9:13 am) · 2 replies
In Torque 1.0 it was a singleton you could always get. This has changed in 1.5, does anyone know how to get the current scenegraph? I know you can define it in your xml,and also know that there can be multiple scenegraphs on the screen at any given time.
#2
12/10/2007 (5:45 pm)
Hmm, while looking at your code I came upon a realization that there will always be a scenegraph around, otherwise an assert gets thrown. I kinda liked the T2DScenegraph singleton, ahh well, thanks for the heads up.
Associate John Kanalakis
EnvyGames
Define the two scene graphs in your levelData.txscene
Add code to query the TorqueObjectDatabase and return each scene graph
T3DSceneGraph SceneGraph1 = TorqueObjectDatabase.Instance.FindObject<T3DSceneGraph>("FirstSceneGraph"); T3DSceneGraph SceneGraph2 = TorqueObjectDatabase.Instance.FindObject<T3DSceneGraph>("SecondSceneGraph");John K.