This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:getterrainlos [2024/04/09 20:52] – Cracked down on details and updated using vigerous testing Vertu | 4rpl:commands:getterrainlos [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== GetTerrainLOS ====== | ====== GetTerrainLOS ====== | ||
- | GetTerrainLOS(< | + | GetTerrainLOS(< |
===== Description ===== | ===== Description ===== | ||
- | Checks a line running from start to endPos and returns the world position (if any) where the line first ever intersects terrain geometry.\\ | + | Checks a line running from startPos |
This routine is useful for checking the exact terrain Line Of Sight (LOS) between two points and where the LOS was blocked. If a unit wants to fire from any location in 3d space to any location in 3d space, this routine can check if there is any terrain in the way and where. | This routine is useful for checking the exact terrain Line Of Sight (LOS) between two points and where the LOS was blocked. If a unit wants to fire from any location in 3d space to any location in 3d space, this routine can check if there is any terrain in the way and where. | ||
- | -The 'start', ' | + | -The 'startPos |
- | -Returns the world space location of where the collision took place. If no hit occurs then all vector | + | -Returns the world space location of where the collision took place. If no hit occurs then the returned |
-CheckLastCell is a Boolean that will have the API extend its calculations past the endPos until it exits the cell the end position is within or a hit is encountered. A cell is a 1x1 square and any location within this square is within that cell (no matter the Y position). For reference, the center location of cell 10,15 is (10.5, | -CheckLastCell is a Boolean that will have the API extend its calculations past the endPos until it exits the cell the end position is within or a hit is encountered. A cell is a 1x1 square and any location within this square is within that cell (no matter the Y position). For reference, the center location of cell 10,15 is (10.5, |