From GMod Wiki
|Returns the center of an entity's OBB as a local vector. Note that this isn't always the same as getting the position of the entity. The center of the bounding box in world coordinates is usually a better source for the center of the model than the position of the model is.|
|BBCode Link:||[b][url=http://wiki.garrysmod.com/?title=Entity.OBBCenter]Entity.OBBCenter [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]|
|Description||The following code can be used to get the center of an entity.|
ent = ents.GetAll() print(ent:LocalToWorld(ent:OBBCenter()))
|Output||The center of the first entity.|
- See the picture to the right for more help understanding the OBB. Keep in mind the coordinates are local - which means the OBB can be rotated or moved around in the world, but the local coordinates will not change.