info_hullshape example

Half-Life HL
info_hullshape example by Erty
Posted 1 year ago2023-03-13 08:10:48 UTC • Examples • Half-Life
Loading...
Screenshot Thumbnail
Name
info_hullshape example
By
Erty Erty
Type
Map
Engine
Goldsource
Game
Half-Life
Category
Examples
Included
RMF/VMF
Created
1 year ago2023-03-13 08:10:48 UTC
Updated
1 year ago2023-03-13 08:10:48 UTC
Views
1099
Downloads
270
Comments
2

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.

2 Comments

Commented 1 year ago2023-03-21 08:09:59 UTC Comment #105179
Thank you for clearing the ambiguity once and for all. 🙏‍

A small note: If you want the player to fit a tight space of width w, the hull size must be at maximum w-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.
Commented 1 year ago2023-03-27 09:12:01 UTC Comment #105189
Thank you for your additions, kimilil!
I'll make sure to include those in the guide 😄

You must log in to post a comment. You can login or register a new account.