path_get_precision

Returns how precise the given path is.

Syntax:

path_get_precision(index);


Argument Description
index The index of the path to check.


Returns: Real.


Description

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".


Example:

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.


Back: Path Information
Next: path_get_speed
© Copyright YoYo Games Ltd. 2018 All Rights Reserved