Determines whether the two points provided are at right angles to each other (i.e. generate a sharp corner).
public static bool isRightAngleTurn(
UnityEngine.Vector3 ,
UnityEngine.Vector3 ,
bool
)
Parameters
- point
- The Vector3 coordinates of the first point.
- nextPoint
- The Vector3 coordinates of the second point.
- approximate
- If true, defines a right angle as being 85 - 95 degrees (inclusive). If false, defines a right angle as being precisely 90 degrees. Defaults to false.
Return Value
true if the points are at right angles to each other, otherwise false.