From 4bba2707644379b506b788a4d2c6e16ebd03f623 Mon Sep 17 00:00:00 2001 From: lonelyfloat <92132666+lonelyfloat@users.noreply.github.com> Date: Mon, 20 Dec 2021 20:00:05 -0500 Subject: [PATCH] Update raylib.h Added CheckCollisionRayLine() --- src/raylib.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raylib.h b/src/raylib.h index 1a9ecce77..2e4fe09d8 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1191,6 +1191,7 @@ RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference +bool CheckCollisionRayLine(Vector2 rayPosition, Vector2 rayDirection, Vector2 startPos, Vector2 endPos, Vector2 *collisionPoint)// Check the collision between a ray defined by a position + direction, and a line segment, returns collision point by reference RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision