Garry's Mod Wiki

Entity:GetHitBoxBounds

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

Description

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

Arguments

1 number hitbox
The number of the hit box.
2 number group
The group 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

Page Links


Special Pages


Wikis

?

Render Time: 81ms

DB GetPage 47
Generate Html 5
SaveChanges (1) 17
Render Body 0
Render Sidebar 10