This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
4rpl:commands:getterrainlos [2022/08/24 00:29] – [Description] More information when involving units on void Vertu | 4rpl:commands:getterrainlos [2024/04/07 22:24] – [Description] Void acts as terrain for hit if LOS is crossed [note] Vertu | ||
---|---|---|---|
Line 21: | Line 21: | ||
This API will overflow if void terrain is involved. This means the API will not return -1 in any vector but -2, | This API will overflow if void terrain is involved. This means the API will not return -1 in any vector but -2, | ||
Further more, sometimes when calculating LOS to a void location (such as a unit position on top of the void), it would be wise to check if the Y vector is lte0 rather than lt0 and any other vector as in practice, the API becomes " | Further more, sometimes when calculating LOS to a void location (such as a unit position on top of the void), it would be wise to check if the Y vector is lte0 rather than lt0 and any other vector as in practice, the API becomes " | ||
+ | |||
+ | :NOTE:\\ | ||
+ | Void acts as terrain so if the start position is above the void and the end is below, a hit will be generated and the API works as expected. | ||