phaser - v4.0.0-rc.4
    Preparing search index...
    • Checks for intersection between the two line segments, or a ray and a line segment, and returns the intersection point as a Vector3, or null if the lines are parallel, or do not intersect.

      The z property of the Vector3 contains the intersection distance, which can be used to find the closest intersecting point from a group of line segments.

      Parameters

      • line1: Geom.Line

        The first line segment, or a ray, to check.

      • line2: Geom.Line

        The second line segment to check.

      • OptionalisRay: boolean

        Is line1 a ray or a line segment? Default false.

      • Optionalout: Math.Vector3

        A Vector3 to store the intersection results in.

      Returns Math.Vector3