public static bool Collide(Vector2 Pos, Vector2 Dir, Vector2 Center, float Radius, out Vector2 CollisionPoint) { Ray R = new Ray(new Vector3(Pos, 0), new Vector3(Dir, 0)); Vector3 Point = Vector3.Zero; CollisionPoint = Vector2.Zero; if (Raylib.CheckCollisionRaySphereEx(R, new Vector3(Center, 0), Radius, ref Point)) { CollisionPoint = new Vector2(Point.X, Point.Y); return(true); } return(false); }