This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
4rpl:commands:getterrainlos [2024/04/09 16:52] – Cracked down on details and updated using vigerous testing Vertu | 4rpl:commands:getterrainlos [2024/04/09 16:54] – Cracked down on details x2 [var name change] Vertu | ||
---|---|---|---|
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 items are -2, | -Returns the world space location of where the collision took place. If no hit occurs then all vector items are -2, | ||