Game Development Community

dev|Pro Game Development Curriculum

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.
Page«First 1 2 Next»
#21
05/19/2009 (11:58 am)
No, i dont think so.

// We set the camera system to run in 3rd person mode around the %player
%this.advCamera.setPlayerObject(%player);
%this.advCamera.setGodViewMode();
%this.setFirstPerson(false);
%this.advCamera.setFollowTerrainMode(false);
%this.advCamera.setVerticalFreedomMode(false);
%this.setCameraObject(%this.advCamera);
}

//ClientGroup.getObject(0).getCameraObject().setThirdPersonMode();
//ClientGroup.getObject(0).getCameraObject().setOrbitMode();
//ClientGroup.getObject(0).getCameraObject().setGodViewMode();

And thats all i have in the game.cs, just like that. and vertical freedom mode is the same true or false.
#22
05/19/2009 (11:57 pm)
hmm.. Isn't it the god mode supposed to be?
Otherwise, it'll be just another third person view, right?

I'm not very sure about this.
#23
05/21/2009 (12:00 pm)
Oh i got it working. It was a mistake on my part cuz i tried to enable the cursor. Works fine when its off
#24
09/05/2009 (4:56 pm)
Does anyone know of a fix for the compile errors?

1>..\..\..\..\..\engine\source\T3D\gameConnection.cpp(1594) : error C2556: 'S32 cGameConnectionsetCameraObject(GameConnection *,S32,const char **)' : overloaded function differs only by return type from 'bool cGameConnectionsetCameraObject(GameConnection *,S32,const char **)'
1> ..\..\..\..\..\engine\source\T3D\gameConnection.cpp(1400) : see declaration of 'cGameConnectionsetCameraObject'

The errors go on but you get the idea.
Page«First 1 2 Next»