Game Development Community

Camera class

by Stefan Grufman · in Torque Game Engine · 12/12/2001 (10:45 pm) · 4 replies

Hi everybody!

In the C3 project we are doing a command center with a mapview. I have done a new TSCtrl class to render the map without fog etc. and then we are placing a camera high up to look down and thus generate the map view.

After a very long debug session I found out that the camera class has a hard coded max value for pitch/yaw. Thus you cannot look straight down with it... This is all good for a FPS view etc, but bad for us. It is no big deal, we have changed it in our build, but I do feel that maybe the GG crew could change this code from being hardcoded into the C++ class into being some $prefs values or so. It would be good to have it as run-time parameter instead of compile-time.

Thanx.
Stefan Grufman

About the author

Recent Threads


#1
12/14/2001 (9:34 am)
That camera class has a bunch of things for flying around, orbitting a player, etc. If you pare it down to just the basic core, the camera doesn't really do anything. You may want to make your own copy of the class and modify it to better suite your needs.

Something to think about... the camera is a controllable object, which means that information is sent to the server and back when the camera is being used. You can also only have one controllable object at a time, thus you could not move your map view the same time as your controlling the player. Every change in your map's camera position would also be synced with the server. This is pretty heavy weight network wise for a commander map view and may not be what you want.

You might want to consider a client side 3D control, more along the lines of the TSControl or the show control, or some of the editor guis. Basically skip the whole camera thing.
#2
12/15/2001 (7:25 am)
We are thinking about those alternatives right now. We used the way you talked about, by moving the camera (through setControlObject() ). This was to get an easy way of getting a "view transform" for the TSCtrl we created. I will look at using no camera at all as well.

Thanx!
/Stefan
#3
12/15/2001 (7:34 am)
Tim, you know the original T2 map view, was it actually the map viewed from above, or a bitmap mapped to a poly? it seems pretty heavy work to display the whole map even if it is LOD'd.

I just wondered how the map view was created in the commander map originally is all.

Phil.
#4
12/15/2001 (8:54 am)
In T1 the commander map was a bitmap rendered at mission load time and for T2 it was a 3D gui control. In both cases camera movement, pan, zoom, etc. were all managed by the client gui control. The T2 map is slow, I don't really like it.