Game Development Community

The Airplane Tutorial?...

by VcDeveloper · in Torque X 2D · 12/15/2008 (4:01 pm) · 7 replies

I just completed the section of putting the compass together, but during play it's taking a copy of it. I can even fly around it.

I did notice the tutorial on my system is different than the one online and some of members and fields use in this section doc's are obsolete. So I do you correct this so it will not do this?

Now, the InstrumentStyle.Anchor = AnchorFlags.All part of this tutorial I'm assuming is obsolete because I cann't find it in the GUIStyle class. And according to the my tutorial doc's:

And by setting the Anchor to AnchorFlags.All we cause it to expand to fill all the area of its parent, so in this case it will expand to be the same size as WorldView.

so I'm assuming since this is now obsolete the online doc's are using:

InstrumentView.Bounds = new GarageGames.Torque.MathUtil.RectangleF(0.0f, 0.0f, 1024.0f, 768.0f);

but, there's a copy of the compass being used and the other left in-place and both are functioning at the same time.

#1
12/15/2008 (4:48 pm)
I don't have time to go through the tutorial right now, but I can tell you that the online tutorials are updated to support XNA 2.0 and the latest version of Torque X.

Soon, a new set will go up supporting the upcoming 3.0 support release.
#2
12/15/2008 (5:59 pm)
I will redo the whole tutorial from the online doc's and get back with you.
#3
12/15/2008 (7:47 pm)
I'm at the point where I competed the the first camera view to following the airplane. But, where I set the WorldView.RenderMask = mainCamera is causing a blank screen. It's suppose to:

// only render objects of type "mainCamera"

but, sofar according to the tutorial there's no other object with this name. I set this Object name to the airplane and it did show in the blank scene. Was this suppose to happen this way?
#4
12/15/2008 (9:04 pm)
I think I figured out what was missing in your updated tutorial. I put the "mainCamera" Object Name in the templates to all the different ships and the water tilemap. Now sofar everything is displaying properly.

Now for the mini me map!
#5
12/15/2008 (9:53 pm)
I completed the tutorial and that was the missing variable needed to be assigned to all main camera assets. The only other problem when creating the camera clone for the Compass was:

T2DSceneCamera DefaultCamera = TorqueObjectDatabase.Instance.FindObject("Camera") needed ----- > as T2DSceneCamera;

other than that, the tutorial gave me insight on creating multiple camera's. Thanks!
#6
12/15/2008 (10:18 pm)
Nice find. Thanks! I'll make sure the fixes make it into the 3.0 tutorials. Great work!
#7
12/15/2008 (11:21 pm)
Thanks! It's a pleasure to be of some help!

...and Thanks You for the excellent product of Torque X! It has given me a tool to make my dreams and goals come true!

Keep it going!