Game Development Community

Camera view

by Jedidiah Weller · in Torque Game Engine Advanced · 03/04/2009 (9:16 am) · 3 replies

Hello,

I've been browsing through past posts regarding making the default camera view to 3rd person. It seems most of the answers/posts are regarding TGE and not TGEA. Does anyone have a working step to making the default camera view 3rd person? So far I have tried the following:

In server/scripts/player.cs changed

<-- ServerConnection.setFirstPerson(false);
-->
and commented out //moveMap.bind(keyboard, tab, toggleFirstPerson );

This prevents me from using tab ingame, but it is still loading default as first person. I can not find any other references to "FirstPerson" in the files when searching.
(P.S.- when I add "ServerConnection.setFirstPerson(false);" into the console it changes to 3rd person, and doesn't allow switched back which is good).

Thanks for the help!

~EDIT: I also added
$firstPerson = false; at the end of game/scriptsandassets/client/init.cs and that also had no effect.

#1
03/04/2009 (10:27 am)
Did you make sure to delete your .dso's?
#2
03/04/2009 (10:45 am)
It works the same in both engines. Not sure what you changed in player.cs, but commenting out the toggle was good. What you need to do is modify function GameConnection::createPlayer(), at the end of said function after the player is setup, inventory given and after the control is set, you'll need to add this
// set to third person view
%this.setFirstPerson(false);
#3
03/04/2009 (11:04 am)
ahh beautiful, Worked well! Thanks guys!

(Recap)

\game\scriptsAndAssets\server\scripts\game.cs
lines 361-363 added:
" // set to third person view

%this.setFirstPerson(false);"
---------------------------------------------------------

\game\scriptsAndAssets\client\scripts\default.bind.cs

line 265 comment out
"// moveMap.bind(keyboard, tab, toggleFirstPerson );"

Now player starts 3rd person, and user can not toggle back. Quick note- Im not sure if this will apply if a command is entered into console.