Page 1 of 1

Line of Sight Oddness

Posted: Mon Sep 03, 2018 9:11 pm
by Kabill
Just found some strangeness with LoS for missile units.

In this image, my horse archers on a straight diagonal can shoot at a unit of foot in an elevated position:

20180903215955_1.jpg
20180903215955_1.jpg (542.54 KiB) Viewed 1175 times


However, the horse archer unit adjacent to it cannot shoot:

20180903215958_1.jpg
20180903215958_1.jpg (537.03 KiB) Viewed 1175 times


I assume the hill corner is obstructing LoS for the second unit (which I've see with other LoS blocking terrain, e.g. trees, which seems inconsistent with the general LoS rules but could still be working as intended). But if that was the case, then surely the first unit would not be able to attack as well as it is also obstructed by the same space.

For reference, both the tile the targeted unit is on and the hill corner are the same elevation level (100).

Re: Line of Sight Oddness

Posted: Mon Sep 03, 2018 9:14 pm
by Kabill
(Ignore the repeat images at the bottom. Seem to have some issues with image attachments where it's duplicating images that are placed inline.)

Re: Line of Sight Oddness

Posted: Tue Sep 04, 2018 7:21 am
by rbodleyscott
The LOS code is in the engine (not in the game scripts). Apparently there are difficulties in making the LOS calculations perfect without performance issues, and anomalies such as this can arise.

Re: Line of Sight Oddness

Posted: Thu Sep 06, 2018 8:02 pm
by Kabill
Fair enough. It's not a major issue.