- Documentation
- Server functions
- setColPolygonPointPosition
Function
setColPolygonPointPosition
Moves a vertex of a polygon zone; the detection area changes immediately.
Syntax
bool setColPolygonPointPosition(colshape shape, int index, float x, float y)Arguments
shapecolshape- A polygon zone.
indexint- Vertex number from 1.
xfloat- New X.
yfloat- New Y.
Returns
true on success.
Example
local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5)
setColPolygonPointPosition(zone, 3, 10, 10)