Returns how precise the given path is.



参数 描述
index The index of the path to check.

Returns: Real.


This function returns with what precision the given path has been "smoothed", and will be an integer value from 1 to 8. Although you can get (and set) this value for a straight-line path it will have no influence over how an instance uses the path as it is only relevant when the path kind is set to "smooth".


if path_get_kind(mypath)
   if path_get_precision(mypath) !=8 path_set_precision(mypath, 8);

The above code checks the path indexed in "mypath" to see what kind it is and if it is smooth, it then checks how precise the smoothing is. If it is less than 8, it is then set to a value of 8.

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