Garry's Mod Wiki

Entity:GetRotatedAABB

Description

Returns the min and max of the entity's axis-aligned bounding box.

Arguments

1 Vector min
Minimum extent of the bounding box.
2 Vector max
Maximum extent of the bounding box.

Returns

1 Vector
Minimum extent of the AABB
2 Vector
Maximum extent of the AABB

Example

The entity's AABB center (regardless of model origin) is stored in 'pos'.

local a, b = ent:GetRotatedAABB( v:OBBMins(), v:OBBMaxs() ) local pos = ( ent:GetPos() + ( a + b ) / 2 )
Output: pos has the coordinates of the AABB center.

Page Links


Special Pages


Wikis

?

Render Time: 34ms

Session 0
DB GetPage 2
Generate Html 10
SaveChanges 8
Render Body 0
Render Sidebar 12