Entity.SetCollisionBounds
From GMod Wiki
Function | |
Syntax | Entity:SetCollisionBounds( Vector min, Vector max ) |
Description: | |
In a scripted entity's ENT:Initialize event, sets the bounding box of the entity. The box's corners are min and max. See additional notes for more information. | |
Returns: | nil |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.SetCollisionBounds]Entity.SetCollisionBounds [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- Both of the vectors should be local vectors (meaning that 0,0,0 is the center of the model, not the center of the map)
- The vectors are measured in world units.
- The 'min' is the lowest X, Y, and Z values on the model. For a normal box, all three values should be the same as 'max', but negative.
- The 'max' is the highest X, Y, and Z values on the model. For a normal box, all three values should be the same as 'min', but positive.
- The bounding box is used for triggers (like trigger_multiple or ENT:Touch for scripted entities), determining if rendering is necessary clientside, and collision (if the entity's solid is SOLID_BBOX).