Entity.WorldSpaceAABB

From GMod Wiki

Revision as of 04:26, 20 June 2010 by TheJ89 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:WorldSpaceAABB( )
Description:
Returns two vectors representing the minimum extent and maximum extent of the entity's bounding box.
Returns: Vector ,Vector
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.WorldSpaceAABB]Entity.WorldSpaceAABB [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThe following is a function to get the height, width, and length of the model's AABB.
Used onNewerShared.png
Code
 
function getEntityWidthLengthHeight(ent)
    local min,max = ent:WorldSpaceAABB()
    local offset=max-min
    return offset
end
 
OutputThe function returns a vector with width as the vector's x, length as the vector's y, and height as the vector's z.


Additional Notes

Worldspaceaabb.png These are the points this function returns

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox