With this function you can insert a new point into a path (the path can have been created in the path editor or through code using path_add()). The point will be added into the path before the point "n" that is specified in the function.
path_insert_point(index, n, x, y, speed);
Argument | Type | Description |
---|---|---|
index | Path Asset | The index of the path to insert the point into. |
n | Real | The defining point to insert the new point BEFORE. |
x | Real | The x coordinate (relative to the path) of the new point. |
y | Real | The y coordinate (relative to the path) of the new point. |
speed | Real | The speed factor of the point. |
N/A
path_insert_point(mypath, 0, 50, 50, 100);
This will insert a point at the very beginning of the path indexed in the variable "mypath", at (50,50), with a speed factor of 100%.