getColShapeType
Shared
Tells what shape a collision shape has.
int|false getColShapeType(element shape)
Parameters
| Name | Type | Description |
|---|---|---|
| shape | element | The collision shape. |
Returns
0 circle, 1 cuboid, 2 sphere, 3 rectangle, 4 polygon, 5 tube. false if the shape has none registered.
Example
if getColShapeType(shape) == 4 then
local floor, ceiling = getColPolygonHeight(shape)
end