A 2D ray that can be cast into the scene to do collision detection

Hierarchy

  • Ray

Constructors

Properties

Methods

Constructors

Properties

dir: Vector
pos: Vector

Methods

  • Returns the point of intersection given the intersection time

    Parameters

    • time: number

    Returns Vector

  • Tests a whether this ray intersects with a line segment. Returns a number greater than or equal to 0 on success. This number indicates the mathematical intersection time.

    Parameters

    Returns number