A basic example on how to use info_hullshape.
The slope on the left behaves as normal. You can stand at the very top without sliding off of it.
However, the slope on the right uses
info_hullshape to give the player a different hull shape when interacting with the slope, and as such the player cannot stand at the top and will instead reliably slide off.
The way this works is that I've made two brushes: Both of which are cuboids but with a tapered bottom, and they have the dimensions
32x32x72
and
32x32x36
for standing and crouching respectively. These are tied to each their own
info_hullshape along with an origin brush each and given the targetnames
slippery_stand and
slippery_crouch.
Both slopes (along with the little "stairs" in front) are tied to each their own
func_detail (this also works with any solid brush entity as well). With SmartEdit off, the keys
zhlt_hull1
and
zhlt_hull3
are added and given the values
slippery_stand and
slippery_crouch respectively.
This tells the compiler to generate the clipping hulls for these
func_details as if the player was shaped like the two
info_hullshapes.
It's also possible to use the
Set as default shape (defaulthulls)
key for the
info_hullshapes if you wish for those to be the default of your map.
A small note: If you want the player to fit a tight space of width
w
, the hull size must be at maximumw-1
. If the narrowest passable doorway in the map is 24u wide, the hullshape needs to be 23u wide (both directions ofc).Another note: The origin height of hull3 (ducking player) should be half of the original 36u hull regardless of the height of your custom hull. I did a little testing and, for whatever reason, you could get the ducking hull stuck under the standing hull, meaning players can't recover from a ducking position, and would stay ducking unless they jump.
I'll make sure to include those in the guide 😄