MathUtils.RayIntersect

MathUtils.RayIntersect method

Check if ray (origin, dir) intersects with line segment(start, end)

public static Vector2? RayIntersect(Vector2 origin, Vector2 dir, Vector2 a, Vector2 b)
ParameterTypeDescription
originVector2
dirVector2
aVector2
bVector2

See Also