Entity:WorldSpaceAABB
Description
Returns two vectors representing the minimum and maximum extent of the entity's axis-aligned bounding box (which is calculated from entity's collision bounds.
Returns
Example
Prints Entity(1)'s maximum bounding box vector.
Output: -496.828125 11730.426758 5189.393066
Example
With developer
set to 1
, draws the AABB of given entity using debugoverlay.
local e = Entity(123)
local mi2, ma2 = e:WorldSpaceAABB()
debugoverlay.Box( vector_origin, mi2, ma2, 10, Color( 255, 255, 255, 32 ) )