Function bar

  • Draw a bar, which is a line specified by the center coordinates and length.

    Returns

    Information about objects that collided during drawing.

    Parameters

    • x: number | VectorLike

      An x-coordinate or Vector position of the center of the bar.

    • y: number

      A y-coordinate of center of the bar.

    • length: number
    • thickness: number
    • rotate: number = 0.5

      Angle of the bar.

    • centerPosRatio: number = 0.5

      A value from 0 to 1 that defines where the center coordinates are on the line, default: 0.5.

    Returns Collision

Generated using TypeDoc