Line of fire is addressed on the scripts of Mapnav?

(Joao Rocha) #1

I Have the following case:
An unit can fire within range, but cannot if has an element between itself and target.
Among all assets of MapNav 2, is there something that addresses this problem or that it aids me towards this goal?

(Leslie Young) #2

A raycast could check if there is a unit in the way, except if you mean to check per tile up to the position of the target. In the that case I assume you have a list of the nodes the “bullet” will travel over so you can easily check them to to see if there is something standing on that node.