M MY Multiplayer: Wiki
Side
Kind

getColShapeType

Shared

Tells what shape a collision shape has.

int|false getColShapeType(element shape)

Parameters

NameTypeDescription
shapeelementThe 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

See also