Game Development Community

Needs Insight on Cameras

by Foestar · in Torque Game Engine Advanced · 04/22/2010 (10:44 am) · 2 replies

Okay, so I've set my mainmenu up as a mission itself. However, I find that I'm having some difficulty on understanding the camera objects. I think part of this is due to the fact that I can only find some of the code to look over to help better understand it. But even after a search and browsing the TDN I find that there wasn't much that seemed to help me understand what I needed.

What I am aiming for is to have it jump to a camera as soon as the mission loads so you don't even notice a player spawning and the first thing you see is what I want you to see. The camera can not move and only moves eventually when I choose to move it. For example, it will follow a path when a certain button is clicked like you see in some games.

I was wondering if anyone could either link me to a really good (and not old and outdated with dead links and none working files) tutorial for using cameras in TGEA or explain to me how to go about this.

#1
04/24/2010 (8:43 am)
Camera support in torque is somewhat lacking in my opinion, but theres many ways you can do this. You can use a path camera, or a dynamic moving object(like vehicle or item) or you can create camera movement using an exported animation.

In all cases, how the camera is controlled depends on what the control object, and camera objects are set as. Investigate setControlObject() and setCameraObject(). Camera control techniques differ depending on what type of objects you decide to use.

If you use a shapebase derived class, like vehicle or item, you have the option doing camera movement by animating a node. In Torque, there are a number of special nodes. "Cam" is used for the third person camera, and "eye" is used when the client object is in first person mode. I believe you can simply create an animation where these nodes are moving as a simple way of doing static camera movements.
#2
04/24/2010 (6:41 pm)
Thanks for the info. Will check it out.