- Documentation
- Server functions
- removeColPolygonPoint
Function
removeColPolygonPoint
Removes a vertex of a polygon zone (numbered from 1). The zone must keep at least three vertices.
Syntax
bool removeColPolygonPoint(colshape shape, int index)Arguments
shapecolshape- A polygon zone.
indexint- Vertex number from 1.
Returns
true when removed; false with 3 vertices or a bad number.
Example
local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5, -5, 5)
removeColPolygonPoint(zone, 4)