Game Development Community

Setting the modelview paramters before rendering

by David Spuhler · in Torque Game Engine · 07/18/2005 (5:31 am) · 1 replies

In order to generate other views than the usual fps view i'm investigating the whole rendering process
in the Torque engine...

unfortunatly it is not clear to me where and when the opengl(dgl) viewing paramters are set as they
change continously when a player is exploring the world...

can anybody tell me how this is done?

Thanks in advance!

#1
07/18/2005 (6:26 am)
Search for the advancedCamera resource. It'll offer you enormous insights on manipulating cameras in TGE. But to tell it briefly:

In stock TGE, the client connection asks it's control object for the camera coordinates. In the FPS demo, the player class responds based on the $firstPerson client variable. If it's true, it returns it's eye transform, otherwise it returns the 3rd person camera coordinates.

The advancedCamera resource is a culmination of some other camera resources. First, it changes TGE to allow the client connections to have aa cameraObject that is separate from the controlObject, allowing you to control an object while viewing the world in the "eyes" of another. Then it proceeds to add the advancedCamera class, that implements a bunch of ways for calculating the camera transform.