User Tools

Site Tools


4rpl:commands:getterrainlos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 Vertu4rpl: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,147,483,648. This means you can not use eq(-1) when looking for when no terrain collision occurs if void is involved. So instead of using eq(-1), use lte0.\\ This API will overflow if void terrain is involved. This means the API will not return -1 in any vector but -2,147,483,648. This means you can not use eq(-1) when looking for when no terrain collision occurs if void is involved. So instead of using eq(-1), use lte0.\\
 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 "indecisive". (If you have more information about this, feel free to edit this section). 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 "indecisive". (If you have more information about this, feel free to edit this section).
 +
 +: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.
  
  
4rpl/commands/getterrainlos.txt · Last modified: 2024/04/13 14:27 by durikkan