// draws a "wide line segment": a rectangle of the given width and color // whose mid-line connects two given endpoints public static void DrawXZWideLine(Vector3 startPoint, Vector3 endPoint, Color color, float width) { Vector3 offset = endPoint - startPoint; offset.Normalize(); Vector3 perp = localSpace.LocalRotateForwardToSide(offset); Vector3 radius = perp * width / 2; Vector3 a = startPoint + radius; Vector3 b = endPoint + radius; Vector3 c = endPoint - radius; Vector3 d = startPoint - radius; iDrawQuadrangle(a, b, c, d, color); }