TGB Microbe Tutorial Issue
by Jonathan Arteaga · in Torque Developer Network · 11/13/2008 (10:44 am) · 3 replies
I have an error going on in the Repeller component in the Microbe tutorial for TGB. The tutorials are found here: http://www.garagegames.com/docs/torqueX/official/, at the bottom of the left pane.
The error I get is on this line in the ProcessTick method in the Repeller component:
T2DSceneGraph.Instance.FindObjects(SceneObject.Position, _radius, TorqueObjectType.AllObjects, (uint)0xFFFFFFFF, _nearbyObjects);
I get an T2DSceneGraph does not contain a definition for 'Instance' error. I tried instantiating a T2DSceneGraph object and calling the method from that but I got the same error. I also looked around on the forums but couldn't find an answer.
Can anyone help? I thought I saw a page some on Garagegames.com with corrections to the tutorials but I could be mistaken.
Thanks.
The error I get is on this line in the ProcessTick method in the Repeller component:
T2DSceneGraph.Instance.FindObjects(SceneObject.Position, _radius, TorqueObjectType.AllObjects, (uint)0xFFFFFFFF, _nearbyObjects);
I get an T2DSceneGraph does not contain a definition for 'Instance' error. I tried instantiating a T2DSceneGraph object and calling the method from that but I got the same error. I also looked around on the forums but couldn't find an answer.
Can anyone help? I thought I saw a page some on Garagegames.com with corrections to the tutorials but I could be mistaken.
Thanks.
#2
03/22/2010 (12:38 pm)
Wow - this seems like an old issue but I am having the exact same problem now with Torque X 2D. I've tried searching but come up empty. Can anyone help?
#3
03/23/2010 (7:22 am)
Never mind, found the solution. For me the problem was case sensitivity when fixing the previous line:T2DSceneGraph mySceneGraph = TorqueObjectDatabase.Instance.FindObject<T2DSceneGraph>("DefaultSceneGraph");
Employee Michael Perry
ZombieShortbus
After that, I will make a pass on the tutorials. This will include a new getting started doc, common practices, and a revision of the existing tutorials to remove the bugs and dated code.
There is a thread in the TorqueX forums that corrects this issue, but I do not remember the link off the top of my head. Check there.