Player Entity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 30: | Line 30: | ||
:* {{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), ie it can be as tall as you like, but width & depth must be the same.}} | ||
==See Also== | |||
* Other Entities which affect ''only'' a Player Entity include: | |||
** [[info_player_start]] and the multiplayer variants theron | |||
** [[game_player_equip]] | |||
** All the HUD and GUI effects entities. |
Revision as of 12:11, 11 April 2008
The Player Entity representing the Player Character is understandably a rather special kind of Entity.
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
- The Player Hull is defined in the uncompiled C++ code in src/game/shared/gamerules.cpp by:
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 (ie 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), ie it can be as tall as you like, but width & depth must be the same.
See Also
- Other Entities which affect only a Player Entity include:
- info_player_start and the multiplayer variants theron
- game_player_equip
- All the HUD and GUI effects entities.