RigidObjectHandle (client)
On the client, a RigidObjectHandle also reads the object's bounding box in the local player's game.
Available on: Client
See also: RigidObjectHandle, RigidObjectHandle (server)
Methods
rigidObject:GetAABB()
Returns the object's bounding box in world space.
Side: Client
Parameters: none
Returns: AABB (with min and max vec3s, see Math), or nil while the object is not spawned in this game (out of range, or its files are not loaded here).
Example
local box = rigidObject:GetAABB()
if box then
local size = box.max - box.min
print("prop size: " .. tostring(size))
end
rigidObject:GetLocalAABB()
Returns the object's bounding box in its own model space (not moved or turned with the object).
Side: Client
Parameters: none
Returns: AABB, or nil while the object is not spawned in this game.
Example
local box = rigidObject:GetLocalAABB()
if box then
local height = box.max.y - box.min.y
end