Player Entity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (minoro)
Line 1: Line 1:
{{stub}}
{{stub}}
The '''Player Entity''' representing the ''Player Character'' is understandably a rather special kind of Entity.
The '''Player Entity''' represents the player character in-game.


 
== Collision Hull ==
==Collision Hull==
The '''Player Collision Hull''' is a simple, convex box; very similar to an [[NPC 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}}).
* 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]].
* Note however, any passageway must allow for the 'extra friction unit' required in addition to the Hull dimension (see [[Dimensions#Player Collision Hull]]).
 


=== Configuration ===
=== Configuration ===
Line 27: Line 25:
  );
  );
: where
: where
:* ''VEC_VIEW'' is the Standing Player's Viewpoint (ie 64 units above origin), and ''VEC_HULL_MIN'' and ''VEC_HULL_MAX'' are diagonally opposite corners of the Standing Player's Hull.
:* ''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 ''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 Hull]]s), ie it can be as tall as you like, but width & depth must be the same.}}
:* {{todo|confirm that the Player Hull must have a square footprint (like all the [[NPC Hull]]s), i.e. it can be as tall as you like, but width & depth must be the same.}}


==See Also==
== See also ==
* Other Entities which affect ''only'' a Player Entity include:
Other entities which affect only the Player Entity:
** [[info_player_start]] and the multiplayer variants therof.
* [[info_player_start]] and the multiplayer variants thereof.
** [[game_player_equip]].
* [[game_player_equip]].
** All the HUD and GUI effects entities.
* All of the HUD and GUI effects entities.
** [[logic_playerproxy]].
* [[logic_playerproxy]].

Revision as of 03:14, 17 April 2008

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: