ray Intersect
abstract fun rayIntersect(startPoint: Vec2, endPoint: Vec2, maxDistance: Double, rayLength: Double): Shape.IntersectionReturnElement
Content copied to clipboard
Checks if a ray intersects with the shape.
Return
Double Returns the distance to the intersection point. maxDistance if no intersection was found.
Parameters
start Point
The start point of the ray.
end Point
The end point of the ray.
max Distance
The ray information.
ray Information
The object to store the information in.