使用此函数,您可以在路径中插入新点(路径可以在路径编辑器中创建或通过使用path_add()的代码创建)。 点将添加到函数中指定的点"n"之前的路径中。
path_insert_point(index, n, x, y, speed);
参数 | 类型 | 描述 |
---|---|---|
index | Path Asset | 要将点插入其中的路径的索引。 |
n | Real | 要在之前插入新点的定义点。 |
x | Real | 新点的X坐标(相对于路径)。 |
y | Real | 新点的Y坐标(相对于路径)。 |
speed | Real | 点的速度因子。 |
N/A
path_insert_point(mypath, 0, 50, 50, 100);
这将在变量"mypath"中索引的路径的起点插入一个点(50,50),速度因子为100%。