path_get_y

Returns the y coordinate of a given path's given position.

语法:

path_get_y(ind, pos);


参数 描述
index The index of the path to check.
pos How far through the path to check. Between 0 (start) and 1 (end).


Returns: Real.


描述

With this function you can get the y coordinate of a position on any given path. 0 is the start of the path, 1 is the end of the path, and anything in between equates to the normalised distance along the length of the path. This value needn't be a defining point of the path, it can be anywhere on it.


例如:

y = path_get_y( path0, 0.5 );

This will set the calling instance's y to the y coordinate of the point at exactly halfway through path0.


上一页: Path Information
下一页: path_exists
© Copyright YoYo Games Ltd. 2018 All Rights Reserved