Garry's Mod Wiki

Entity:GetHitBoxBounds

  Vector, Vector Entity:GetHitBoxBounds( number hitbox, number set )

Description

Gets the bounds (min and max corners) of a hit box.

Arguments

1 number hitbox
The number of the hit box.
2 number set
The hitbox set of the hit box. This should be 0 in most cases.

Returns

1 Vector
Hit box mins. Will be nil if the hit box index was out of range.
2 Vector
Hit box maxs. Will be nil if the hit box index was out of range.

Example

Displays the mins and maxs for the client's first hitbox in the first group, which is generally the head.

local mins, maxs = LocalPlayer():GetHitBoxBounds(0, 0) print(mins, maxs)
Output: -1.250000 -6.500000 -3.190000 8.250000 3.500000 3.310000