Game Development Community

How to completely disable the observer camera

by Rik Girbes · in Torque Game Engine · 10/04/2007 (6:03 am) · 2 replies

If you press "alt + c" you can observe the whole world.

how do i completely disable that?


thanks,
Rik Girbes

#1
10/04/2007 (6:38 am)
Delete, or comment, the following (based on removing it from the starter.fps mod):

In starter.fps\client\scripts\default.binds.cs:
function toggleCamera(%val)
{
   if (%val)
      commandToServer('ToggleCamera');
}
moveMap.bind(keyboard, "alt c", toggleCamera); (make sure you delete this from config.cs too)

In starter.fps\server\scripts\commands.cs:
function serverCmdToggleCamera(%client)
{
   %control = %client.getControlObject();
   if (%control == %client.player)
   {
      %control = %client.camera;
      %control.mode = toggleCameraFly;
   }
   else
   {
      %control = %client.player;
      %control.mode = observerFly;
   }
   %client.setControlObject(%control);
}

For future reference, search for your problem in the scripts. You can usually find them quickly. What I did to locate the code involving the observer camera was this:

1. Launch Torsion
2. Load the starter.fps project
3. Ctrl+Shift+F (find in all files)
4. Search criteria: "alt c"

Figuring it out from there is trivial.
#2
10/04/2007 (7:45 am)
K sorry.

i dont have torsion, but i will buy it now. (i meen its only 39 dollar)