Module collision

Source
Expand description

Common collision handling code

Functionsยง

check_collision_circles
Checks collision between two circles.
check_collision_lines
Check the collision between two lines defined by two points each, returns collision point by reference
check_collision_point_circle
Checks if point is inside circle.
check_collision_point_line
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
check_collision_point_poly
Check if point is within a polygon described by array of vertices
check_collision_point_triangle
Checks if point is inside a triangle.
check_collision_spheres
Detects collision between two spheres.
get_ray_collision_model
Gets collision info between ray and model.
get_ray_collision_quad
Gets collision info between ray and model.
get_ray_collision_sphere
Detects collision between ray and sphere.
get_ray_collision_triangle
Gets collision info between ray and triangle.