Difference between revisions of "Info hullshape"

From Sven Co-op
Jump to navigation Jump to search
(Copied over the entitiy definition I wrote on TWHL, more information about what the entity does and how it's used)
(Added note about minimum path width, hull3 18 z-units requirement in description)
 
Line 4: Line 4:
 
}}
 
}}
  
A brush entity that allows the mapper to set a custom shape for the different collision hulls. The shape must be made of a single brush and must be tied with an origin brush to define the shape's center.
+
A brush entity that allows the mapper to set a custom shape for the different collision hulls. The shape must be made of a single brush and must be tied with an origin brush to define the shape's center. For hull3 (crouching) the origin '''''must''''' be 18 units up from the bottom of the shape otherwise a crouching player may clip into the floor.
  
 
To use this you may either add <code>zhlt_hull1</code>, <code>zhlt_hull2</code> and <code>zhlt_hull3</code> keys whose values are the names of an info_hullshape for ''standing'', ''big monster'' and ''crouching'' shapes respectively to any solid brush entity or [[func_detail]], or set the <code>defaulthulls</code> key of the info_hullshapes accordingly to apply to all geometry by default.
 
To use this you may either add <code>zhlt_hull1</code>, <code>zhlt_hull2</code> and <code>zhlt_hull3</code> keys whose values are the names of an info_hullshape for ''standing'', ''big monster'' and ''crouching'' shapes respectively to any solid brush entity or [[func_detail]], or set the <code>defaulthulls</code> key of the info_hullshapes accordingly to apply to all geometry by default.
Line 24: Line 24:
 
* For reference, default hulls are cuboids of size <code>32x32x72</code> units (hull1, standing), <code>64x64x64</code> units (hull2, big monster) and <code>32x32x36</code> units (hull3, crouching) with origin in the center.
 
* For reference, default hulls are cuboids of size <code>32x32x72</code> units (hull1, standing), <code>64x64x64</code> units (hull2, big monster) and <code>32x32x36</code> units (hull3, crouching) with origin in the center.
 
* Most of the time you will only need hull1 and hull3 as these are the collision hulls used by players (standing and crouching hulls respectively).
 
* Most of the time you will only need hull1 and hull3 as these are the collision hulls used by players (standing and crouching hulls respectively).
 +
* The minimum path width is <code>hull width + 1</code>. So, for example, if you want a player to be able to fit within a 24 unit wide hallway the hullshape must be a maximum of <code>24 - 1 = 23</code> units wide.
 
* This entity can be used to prevent the player from standing on top of slopes by giving the player a hull shape that is tapered or rounded at the bottom.
 
* This entity can be used to prevent the player from standing on top of slopes by giving the player a hull shape that is tapered or rounded at the bottom.
 
* The shape should be kept simple as complex shapes may drastically increase clipnodes used in the map.
 
* The shape should be kept simple as complex shapes may drastically increase clipnodes used in the map.

Latest revision as of 10:38, 27 March 2023

info_hullshape
Type

brush

Status

supported

 


A brush entity that allows the mapper to set a custom shape for the different collision hulls. The shape must be made of a single brush and must be tied with an origin brush to define the shape's center. For hull3 (crouching) the origin must be 18 units up from the bottom of the shape otherwise a crouching player may clip into the floor.

To use this you may either add zhlt_hull1, zhlt_hull2 and zhlt_hull3 keys whose values are the names of an info_hullshape for standing, big monster and crouching shapes respectively to any solid brush entity or func_detail, or set the defaulthulls key of the info_hullshapes accordingly to apply to all geometry by default.


1 Keyvalues

Name : targetname

Property used to identify entities.

Set as default shape : defaulthulls

Whether to use this shape as the default for hull calculations. The available options are:

  • = No
  • 2 = for hull 1 (standing player)
  • 4 = for hull 2 (big monster, e.g. gargantua)
  • 8 = for hull 3 (crouching player)

Disable this entity : disabled

Disable this entity.


2 Notes

  • For reference, default hulls are cuboids of size 32x32x72 units (hull1, standing), 64x64x64 units (hull2, big monster) and 32x32x36 units (hull3, crouching) with origin in the center.
  • Most of the time you will only need hull1 and hull3 as these are the collision hulls used by players (standing and crouching hulls respectively).
  • The minimum path width is hull width + 1. So, for example, if you want a player to be able to fit within a 24 unit wide hallway the hullshape must be a maximum of 24 - 1 = 23 units wide.
  • This entity can be used to prevent the player from standing on top of slopes by giving the player a hull shape that is tapered or rounded at the bottom.
  • The shape should be kept simple as complex shapes may drastically increase clipnodes used in the map.