- Documentation
- Server functions
- getColPolygonPointPosition
Function
getColPolygonPointPosition
Returns the position of one vertex of a polygon zone (numbered from 1).
Syntax
float, float getColPolygonPointPosition(colshape shape, int index)Arguments
shapecolshape- A polygon zone.
indexint- Vertex number from 1.
Returns
x, y, or false.
Example
local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5)
local x, y = getColPolygonPointPosition(zone, 2)