Airplane Tutorial (Mounting a camera to our plane)
by Wayne Scheiner · in Torque X 2D · 05/08/2008 (2:49 pm) · 1 replies
Has been smooth up until the last step in Section #5 "Mounting a camera to our plane"
Up until last step can still debug and Airplane and stills flys off the top of the screen with little control.
Durring last step When I:
"Keep adding code to BeginRun:"
and imput the following code to the BeginRun method in the "Private, protected, internal methods" region on the Game.cs, placing if after the code I just entered, which was placed after the "SceneLoader" line.
// display the camera on screen
GUIStyle WorldStyle = new GUIStyle();
GUISceneview WorldView = new GUISceneview();
WorldView.Style = WorldStyle;
WorldView.Camera = WorldCam;
WorldView.RenderMask = mainCamera; // only render objects of type "mainCamera"
GUICanvas.Instance.SetContentControl(WorldView);
When I then debug and run the game the screen becomes black, although I am reporting no errors.
Can't figure out what I may have mist. I started over 3 times and still hit the same problem every time.
Any help on this issue would be greatly appreciated!
Up until last step can still debug and Airplane and stills flys off the top of the screen with little control.
Durring last step When I:
"Keep adding code to BeginRun:"
and imput the following code to the BeginRun method in the "Private, protected, internal methods" region on the Game.cs, placing if after the code I just entered, which was placed after the "SceneLoader" line.
// display the camera on screen
GUIStyle WorldStyle = new GUIStyle();
GUISceneview WorldView = new GUISceneview();
WorldView.Style = WorldStyle;
WorldView.Camera = WorldCam;
WorldView.RenderMask = mainCamera; // only render objects of type "mainCamera"
GUICanvas.Instance.SetContentControl(WorldView);
When I then debug and run the game the screen becomes black, although I am reporting no errors.
Can't figure out what I may have mist. I started over 3 times and still hit the same problem every time.
Any help on this issue would be greatly appreciated!
About the author
Torque Owner Thomas Wrather
See www.garagegames.com/mg/forums/result.thread.php?qt=73770.