From 81e4a0df5b075101570eb0629620a7d3d733127f Mon Sep 17 00:00:00 2001 From: Spencer Brown Date: Tue, 17 Feb 2026 10:42:10 +1000 Subject: [PATCH 1/2] Document how to change prop_floor_button trigger sizes --- docs/entities/guides/meta.json | 1 + .../guides/portal-floor-button-triggers.md | 43 +++++++++++++++++++ docs/entities/meta.json | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/entities/guides/meta.json create mode 100644 docs/entities/guides/portal-floor-button-triggers.md diff --git a/docs/entities/guides/meta.json b/docs/entities/guides/meta.json new file mode 100644 index 00000000..7d6aa7ac --- /dev/null +++ b/docs/entities/guides/meta.json @@ -0,0 +1 @@ +{ "title": "Guides" } diff --git a/docs/entities/guides/portal-floor-button-triggers.md b/docs/entities/guides/portal-floor-button-triggers.md new file mode 100644 index 00000000..2352e533 --- /dev/null +++ b/docs/entities/guides/portal-floor-button-triggers.md @@ -0,0 +1,43 @@ +--- +title: Portal Floor Button Triggers +weight: 5 +features: + - MOD_PORTAL2 +--- + +# Portal Floor Button Triggers + +The entities [`prop_floor_button`](../reference/prop_floor_button), [`prop_floor_cube_button`](../reference/prop_floor_button), [`prop_floor_ball_button`](../reference/prop_floor_ball_button) and [`prop_under_floor_button`](../reference/prop_under_floor_button) spawn a trigger volume to detect players and cubes. +Each entity uses a different bounding size to match the default model, but custom models may need their own size. +To allow this, these entities look for a hitbox group named `trigger`, and match the size of this. For example, this is the equivalent QC section for a standard modern button: + +```php +$hboxset "default" +$hbox 0 "portal_button_root" -62.46 -7.36 -62.46 62.46 13.64 62.46 +$hbox 0 "portal_button_top" -31.81 -4.91 -31.81 31.80 0.00 31.77 + +$hboxset "trigger" +$hbox 0 "portal_button_root" -20 -20 0 20 20 14 +``` + +The first hitbox set here is used for bullet collisions and other normal purposes. This is normally autogenerated. To get the first set, open your model in HLMV, uncheck "Autogenerate Hitboxes" on the lower-left of the "Bones" tab, then press "Generate QC" in the upper-right. You can also create/edit the trigger hitboxes here, especially handy for fine-tuning positioning. + +The trigger is always created with the same orientation as the button entity, so +the specific bone does not matter. + +## Default sizes +For reference, the default sizes are as follows. All are square, and start at z=0: + +| Classname | Half-Size | Height | +| ------------------------- | -- | ---| +| `prop_floor_button` | 20 | 14 | +| `prop_floor_cube_button` | 20 | 14 | +| `prop_floor_ball_button` | 5 | 14 | +| `prop_under_floor_button` | 30 | 17 | + + diff --git a/docs/entities/meta.json b/docs/entities/meta.json index 2685f91e..3ee09908 100644 --- a/docs/entities/meta.json +++ b/docs/entities/meta.json @@ -1 +1 @@ -{ "title": "Entities" } +{ "title": "Entities", "weight": 100 } From 555cac7b16cf5f6d0fb612972fde5a28b273acbe Mon Sep 17 00:00:00 2001 From: Spencer Brown Date: Tue, 17 Feb 2026 11:47:33 +1000 Subject: [PATCH 2/2] Remove comments --- docs/entities/guides/portal-floor-button-triggers.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/entities/guides/portal-floor-button-triggers.md b/docs/entities/guides/portal-floor-button-triggers.md index 2352e533..f2b13fe4 100644 --- a/docs/entities/guides/portal-floor-button-triggers.md +++ b/docs/entities/guides/portal-floor-button-triggers.md @@ -34,10 +34,3 @@ For reference, the default sizes are as follows. All are square, and start at z= | `prop_floor_cube_button` | 20 | 14 | | `prop_floor_ball_button` | 5 | 14 | | `prop_under_floor_button` | 30 | 17 | - -