Player Entity

From Valve Developer Community
Revision as of 03:14, 17 April 2008 by Tourorist (talk | contribs) (minoro)
Jump to navigation Jump to search

Stub

This article or section is a stub. You can help by expanding it.

The Player Entity represents the player character in-game.

Collision Hull

The Player Collision Hull is a simple, convex box; very similar to an NPC Hull.

  • By default, the Player Hull is 32 units wide and 32 units deep, and 72 units high for a Standing/Running/etc Player or 36 units high when Crouching. (By contrast, an NPC Hull#human_hull is
    Todo: somewhere between 26 and 29 units wide and deep
    ).
  • Note however, any passageway must allow for the 'extra friction unit' required in addition to the Hull dimension (see Dimensions#Player Collision Hull).

Configuration

static CViewVectors g_DefaultViewVectors(
	Vector( 0, 0, 64 ),		//VEC_VIEW 		(m_vView)
								
	Vector(-16, -16, 0 ),		//VEC_HULL_MIN 		(m_vHullMin)
	Vector( 16,  16,  72 ),		//VEC_HULL_MAX 		(m_vHullMax)
													
	Vector(-16, -16, 0 ),		//VEC_DUCK_HULL_MIN 	(m_vDuckHullMin)
	Vector( 16,  16,  36 ),		//VEC_DUCK_HULL_MAX	(m_vDuckHullMax)
	Vector( 0, 0, 28 ),		//VEC_DUCK_VIEW		(m_vDuckView)
													
	Vector(-10, -10, -10 ),		//VEC_OBS_HULL_MIN	(m_vObsHullMin)
	Vector( 10,  10,  10 ),		//VEC_OBS_HULL_MAX	(m_vObsHullMax)
													
	Vector( 0, 0, 14 )		//VEC_DEAD_VIEWHEIGHT 	(m_vDeadViewHeight)
);
where
  • VEC_VIEW is the Standing Player's Viewpoint (e.g. 64 units above origin), and VEC_HULL_MIN and VEC_HULL_MAX are diagonally opposite corners of the Standing Player's Hull.
  • Todo: confirm that VEC_OBS_HULL_MIN...MAX defines the Spectator mode Hull (20x20x20 units) ?
  • Todo: confirm that the Player Hull must have a square footprint (like all the NPC Hulls), i.e. it can be as tall as you like, but width & depth must be the same.

See also

Other entities which affect only the Player Entity: