Game Development Community

Repositioning the camera

by Ryan Scott · in Torque Game Engine · 12/06/2005 (4:50 pm) · 7 replies

I'm working off the demos - tutorial.base

i am wondering how can i make the camera not be directly in the player's head, but instead be above him, pointing down at him?

i'm looking to make a top down view game, 3rd person. i looked in camera.cs, but it doesn't seem to have anything tweakable to change this...

how can i change the cameras position in relation to the man?

sorry to be a noob

#1
12/06/2005 (5:03 pm)
Hit tab to go to 3rd person view.
If you want the camera further back, check the player.cs (I think) and look for
cameraMaxDist = 3;
Change the 3 to 5 or 20 or what have you and it will place you further back. Getting the camera higher...? Not sure.
Hope that helps

Cheers :)
#2
12/06/2005 (5:23 pm)
You can go to a normal third person follow view by hitting "tab" in game. Beyond that though, nothing can really be done without modifying the engine. This resource implements a number of new camera types, surely including some manner of what you want.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471
#3
12/06/2005 (6:09 pm)
Oh no, so i have to compile the source then...

i don't really want to get all involved with visual studio - i'm using torque because its so much easier :)

what is the absolute simplest way to incorporate these resources into the engine?
#4
12/06/2005 (6:48 pm)
If you are using 1.3, that resource may have files you can just copy over a clean build and compile it, otherwise it will probably have to be hand ported to be sure it works with 1.4. A camera that does what you want _is_ simpler than that resource, so you could also try reading through it and just implementing the part that does what it is you want, or else wise figure out the math for setting up the camera on your own, it may not be massively difficult. I just don't think there's any easy way to hack this into script given the way cameras are integrated into the engine by default, though I'd love to see otherwise. Editing source is an inevitability for doing a lot of things beyond what the original engine intent was (primary FPS games). I've learned to work with source fairly well, just from experimenting and looking at resources, and I'm far from any kind of C++ expert. Though I was only able to get it setup with TBE, and since 1.4, getting things setup to compile it isn't as easy just yet...
#5
12/08/2005 (1:05 pm)
Here's a stupid question - what if my player was kept way up in the sky with camera still coming out his eyes but pointing at another player on the ground, this is my actual player.

the camera equiped player could be restricted to a track above my playfield (which is essentially a one-way chasm), looking down.

that is, use player as camera, but have another object be your ship that you are controlling.

clearly i don't know the engine yet!
#6
12/08/2005 (1:53 pm)
Using your 3d program you should be able to reposition the cam object in the model to a different location.
#7
12/08/2005 (2:08 pm)
I guess you could do your weird model solution, mount an invisible model to the player (camera) and adjust movement with the one on the ground.

The advanced camera is 100 million times less complicated and much more reliable, though. I've been using it for a long, long time.