2 Replies Latest reply on Dec 16, 2006 6:53 AM by Peter Lorent

    Grids Overlap a Line

    Gionex
      Hey
      If have a line that is shot from my guy. The angle, distance and start and end points are known. I have again, a 30x30 grid. Is it possible to find out which grid spaces the line crosses? E.g. a line from 0,0 to 0,90 will cross grid spaces 0,0 0,1 0,2. Its obviously easy in this example just Math.floor() the numbers but when it is at an angle is gets much more complexe.
      Thanks for any help I get!
      Dan0