mwg API
    Preparing search index...

    Function traceLine

    • Every cell a straight line crosses from from to to, from included and to included.

      Bresenham's algorithm, not a shadowcast: this answers "what is on the way to this exact point", which is what aiming needs. FieldOfView answers "what can be seen from here at all", a different question with a different (and pricier) algorithm.

      Parameters

      Returns Step[]