Advanced Camera Resource and TGEA 1.7.1
by Playware · 05/07/2009 (12:32 am) · 24 comments
Here's the infamous Advanced Camera Resource by Thomas "Man of Ice" Lund (http://www.garagegames.com/community/resource/view/5471/). It's a very useful resource but the original post was supposed to work with TGE. Even though this resource works well with TGEA, there are several steps that we don't need to follow in TGEA. And there are 22 pages of comments for this resource, making hard to find something you need.
So in this post, I want to tell how I followed the original posts and get it work with TGEA 1.7.1 as simple as possible. So here it is.
1. Download the resource and extract advancedCamera.cc and advancedCamera.h.
2. I renamed the advancedCamera.cc to advancedCamera.cpp.
3. Put these two files under enginesourceT3D.
4. In Visual Studio solution explorer, under T3D filter, add these two files using Project->Add Existing Items...
5. In advancedCamera.cpp, comment #include "dgl/dgl.h"
6. Change #include "game/game.h" to #include "app/game.h"
7. Replace the "game" part in these statements with "T3D".
#include "game/advancedCamera.h"
#include "game/gameConnection.h"
#include "game/moveManager.h"
#include "game/player.h"
8. Change #include "editor/editor.h" to #include "gui/missionEditor/editor.h"
All the rest of the steps like "Exposing mCameraObject" and "Camera read/write packets" are not needed to change.
So follow the rest of scripting steps and you can enjoy this resource. Press the "TAB" key to switch to your camera mode.
Thanks Thomas "Man of Ice" Lund for releasing such a cool resource.
Actually, these are just easy fixes for an experienced coder. But anyway, hope this post useful for someone.
So in this post, I want to tell how I followed the original posts and get it work with TGEA 1.7.1 as simple as possible. So here it is.
1. Download the resource and extract advancedCamera.cc and advancedCamera.h.
2. I renamed the advancedCamera.cc to advancedCamera.cpp.
3. Put these two files under enginesourceT3D.
4. In Visual Studio solution explorer, under T3D filter, add these two files using Project->Add Existing Items...
5. In advancedCamera.cpp, comment #include "dgl/dgl.h"
6. Change #include "game/game.h" to #include "app/game.h"
7. Replace the "game" part in these statements with "T3D".
#include "game/advancedCamera.h"
#include "game/gameConnection.h"
#include "game/moveManager.h"
#include "game/player.h"
8. Change #include "editor/editor.h" to #include "gui/missionEditor/editor.h"
All the rest of the steps like "Exposing mCameraObject" and "Camera read/write packets" are not needed to change.
So follow the rest of scripting steps and you can enjoy this resource. Press the "TAB" key to switch to your camera mode.
Thanks Thomas "Man of Ice" Lund for releasing such a cool resource.
Actually, these are just easy fixes for an experienced coder. But anyway, hope this post useful for someone.
#2
05/08/2009 (9:58 am)
@Haider - You will need to post using the account that actually has source access to the engine. Right now this profile does not show license ownership...
#3
in advancedCamera.h
game/shapeBase.h should be changed to T3D/shapeBase.h
in advancedCamera.cpp
core/bitStream.h should be changed to core/stream/bitStream.h
I changed that and the application compiled. After I added the script everything worked swimmingly.
05/08/2009 (4:55 pm)
It works with TGEA 1.8.1 as well. There are a few additional files you need to set straight though.in advancedCamera.h
game/shapeBase.h should be changed to T3D/shapeBase.h
in advancedCamera.cpp
core/bitStream.h should be changed to core/stream/bitStream.h
I changed that and the application compiled. After I added the script everything worked swimmingly.
#4
Thank you for the post, (Haider m Sithawalla) and MrTroy. And of course thank you to (Thomas \"Man of Ice\" Lund) for writing the original.
05/08/2009 (10:54 pm)
I'm also doing some initial research on the issue of cameras for Torque 3D. Anyone try this in Torque 3D yet? Is it the best (or at least a good) method / option?Thank you for the post, (Haider m Sithawalla) and MrTroy. And of course thank you to (Thomas \"Man of Ice\" Lund) for writing the original.
#5
Still waiting on that link Haider...
05/08/2009 (11:36 pm)
There is something big coming down the pipe for Torque 3D in regard to cameras. I just got my first peak at a new tool being added, and it renders past camera resources obsolete.Still waiting on that link Haider...
#6
05/09/2009 (9:10 am)
Haiders account is showing TGEA for me atleast. TGB, TGBP, TGE and TGEA.
#7
05/09/2009 (9:14 am)
@Mikael, ditto...
#9
By "new tool"... Is this a cut scene thing? Will it make it easy to add cameras such as (Diablo series style god mode, centered on player/object) or (RTS camera like Warcraft series, Command & Conquer series) or (modify a normal 3rd person ground camera as seen in out of box Torque 3D)?
Is there any ETA? Or the name for the camera tool so I can blog-stalk it? O:-)
05/09/2009 (1:59 pm)
@Michael Perry: Thanks for mentioning about this new camera stuff coming... Sounds very exciting!By "new tool"... Is this a cut scene thing? Will it make it easy to add cameras such as (Diablo series style god mode, centered on player/object) or (RTS camera like Warcraft series, Command & Conquer series) or (modify a normal 3rd person ground camera as seen in out of box Torque 3D)?
Is there any ETA? Or the name for the camera tool so I can blog-stalk it? O:-)
#10
05/09/2009 (2:05 pm)
Wish I could go into more details, but I don't like to steal the thunder of the devs and Brett. I just write the docs, remember ;)
#11
05/09/2009 (8:21 pm)
Btw, I did see the two new out-of-the-box smooth-style cameras in the map editor. Though I haven't investigated yet whether Torque 3D has new camera stuff that makes this "Advanced Camera Resource" code modification redundant, vs. if it's still needed.
#12
05/11/2009 (8:01 am)
Thank you for this resource, but I can´t make it work :S, it shows a console error: Unable to instantiate non-conobject class AdvancedCamera. Any help would be really helpful, thanks.
#13
I wish I own T3D to check these new stuffs out. :(
@Michael Perry: Good to hear that you finally saw I owned TGEA. :D
@Nicolas Caceres: Can you compile the engine successfully after changing these stuffs?
05/11/2009 (7:45 pm)
Glad to see this post is useful for some of you guys.I wish I own T3D to check these new stuffs out. :(
@Michael Perry: Good to hear that you finally saw I owned TGEA. :D
@Nicolas Caceres: Can you compile the engine successfully after changing these stuffs?
#14
05/11/2009 (8:38 pm)
Thank you Haider, I saw there was an error compiling the engine, but I fixed it and now it works, thanks!
#15
05/13/2009 (1:43 am)
This still does not work on a client without the server right ?
#16
05/16/2009 (3:34 pm)
Nicolas, I'm having the same error, can you tell me what you changed?
#17
05/17/2009 (7:35 pm)
@Drea Kario: What errors you have while compiling the engine after those changes? Can you post them here?
#18
Just wanted to say thanks for posting this. I completely agree that it was a good idea to put a concise up to date summary about Man of Ice's Advanced Camera post, especially the part about:
> All the rest of the steps like "Exposing mCameraObject" and "Camera read/write packets" are not needed to change.
I got it working following your guide, and did a quick test run for the God Mode camera, for Torque 3D beta 1.
This is basically my very first Torque 3D code task. So I haven't figured out yet whether (it's actually necessary to use Advanced Camera) vs. (use the standard Torque 3D camera). Torque 3D has an orbit mode camera in the editor, so maybe I should just be using that...
05/18/2009 (12:19 am)
Haider:Just wanted to say thanks for posting this. I completely agree that it was a good idea to put a concise up to date summary about Man of Ice's Advanced Camera post, especially the part about:
> All the rest of the steps like "Exposing mCameraObject" and "Camera read/write packets" are not needed to change.
I got it working following your guide, and did a quick test run for the God Mode camera, for Torque 3D beta 1.
This is basically my very first Torque 3D code task. So I haven't figured out yet whether (it's actually necessary to use Advanced Camera) vs. (use the standard Torque 3D camera). Torque 3D has an orbit mode camera in the editor, so maybe I should just be using that...
#19
05/19/2009 (12:27 am)
@ haider, i actually fixed the errors that i was having, but now i cant seem to make the camera respond to the mouse movements. Its all fixed in place like god view is. Any ideas on where i went wrong?
#20
%this.advCamera.setStaticMode();
%this.advCamera.setTrackMode();
%this.advCamera.setGodViewMode();
%this.advCamera.setThirdPersonMode();
Are you using some static modes?
05/19/2009 (3:00 am)
You can set mode by calling functions like below:%this.advCamera.setStaticMode();
%this.advCamera.setTrackMode();
%this.advCamera.setGodViewMode();
%this.advCamera.setThirdPersonMode();
Are you using some static modes?

Torque Owner Kevin Mitchell
12 CatBlack Studios