Sponsored By

Third Person - The BasicZ

Games in 3D allow for a large amount of third person control.

Curtis Turner - IceIYIaN, Blogger

June 13, 2010

3 Min Read

Back in the day games used 2D tech. With the move to 3D, this brought a lot of control over the camera.

Today I'm going to be talking about Valve's Source engine and their third person system.

First Person and Third Person are the same. They start in the same location. The only differences are adding a player model(Third Person, sometimes FP though) and weapon hands(FP).

Valve uses id's Quake tech:
Config.cfg (Holds all your hotkeys and variables)
Console - You can talk to the game, rather than players
exec SomeConfig.cfg (In console)
alias - Allows you to create a new hotkey, somewhat the same as a NewConfig.cfg

Also, mappers can take control of the camera(Think old Resident Evil)

Commands:
cam_idealdist 64 0/1024 - Distance from player
cam_idealdistup 0/20 is good - Moves above head
cam_idealdistright 0/20/-20 - Shoulder View
cam_idealpitch 0/90 - Creates a top down view/sky(Classic Zelda)
cam_idealyaw 0/90/180 - Creates a side view (Mario)

c_Min_CommandsAboveThis xXx
c_Max_CommandsAboveThis xXx
This is what the player is allowed to do(This is what I believe Valve will use to make third person server based - Right now sv_cheats 1 is required)

m_pitch 0 / 0.022 - Stops the mouse from controlling aiming up/down
m_yaw 0 / 0.022 - Stops the mouse from controlling aiming left/right
cl_yawspeed  "200" - xController Yaw
cl_pitchspeed  "200" - xController Pitch

CenterView/Force_CenterView - Makes the player look straight (Useful to switch to a top down/sky/side view)

Future:
Make it so the player can enable/disable body parts (The most useful is removing the head)
Allowing body transparency(Invisible)
HUD/Mouse - aka Real Time Strategy ability
Trying to snyc First Person and Third Person as much as possible. Model height, animations, yadda.

Current:
Video(Doesn't show shoulder views, as the command wasn't available)
http://www.moddb.com/mods/elements-of-war/videos/elements-of-war-counter-strike 

Example config from my 1337 Board mod:
xCFG/xDefault/xView/ThirdPerson.cfg
[CODE]
// /* *** *** ***                 *** *** *** */ //
// /* *** *** *** Elements of War *** *** *** */ //
// /* *** *** ***                 *** *** *** */ //

sv_cheats "1" // Required for Third Person

centerview
force_centerview

// Allow the player to AIM
exec xAiming.cfg

// Set First Person or Third Person
// cam_command  "0" // 0 Does nothing, maybe FP/TP / 1 TP usually / 2 FP usually
// firstperson  "0"
thirdperson  "1"
// thirdpersonshoulder "0" // THIS IS NOT A BOOL YET

dev_overview  "0"
cl_leveloverview "0"

// Collision - TP, if camera touches a wall, it zooms in
cam_collision  "1"

 

// Shows what angles the cam has
// cam_showangles  "1"

// What the camera is allowed to do
c_mindistance  "-9999"
c_maxdistance  "9999"
c_minpitch  "-9999"
c_maxpitch  "9999"
c_minyaw  "-9999"
c_maxyaw  "9999"
// c_minup  "-9999"
// c_maxup  "9999"
// c_minright  "-9999"
// c_maxright  "9999"

// Set the camera location
exec xCFG/xDefault/xView/xDist0.cfg
exec xCFG/xDefault/xView/xUp0.cfg
exec xCFG/xDefault/xView/xRight0.cfg
exec xCFG/xDefault/xView/xPitch0.cfg
exec xCFG/xDefault/xView/xYaw0.cfg

 

// camortho  "0" // THIS IS NOT A BOOL YET
// c_orthoheight  "100"
// c_orthowidth  "100"

// Toon looks around, but camera view won't.
// thirdperson_mayamode "0" // THIS IS NOT A BOOL YET
thirdperson_platformer "0" // Toon will aim in the direction they move
thirdperson_screenspace "0" // Movement will be relative to the camera

cam_idealdelta  "0" // "4.0" // Speed at which the camera will change
cam_ideallag  "0" // "4.0" // Amount of lag used when matching offset
//     // to ideal angles in TP view

// cam_contain  "0" // Unknown

 

// *** Gold Source // Quake *** //
chase_active  "0"

// *** Quake III *** //
cg_thirdperson  "1"
// com_cameraMode  "1"

// *** Quake IV *** //
pm_thirdperson  "1"
// pm_thirdpersondeath "1" // tpv when player dies
// pm_maxviewpitch  "99"
// pm_minviewpitch  "-99"
[/CODE]

 

// Curtis Turner <IceIYIaN>
// Creator of Elements of War!
// http://www.ElementsofWar.NET
// http://www.ModDB.com/Mods/Elements-of-War

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like