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
Last revisionBoth sides next revision
4rpl:commands:getterrainlos [2024/04/09 16:52] – Cracked down on details and updated using vigerous testing Vertu4rpl:commands:getterrainlos [2024/04/09 16:54] – Cracked down on details x2 [var name change] Vertu
Line 3: Line 3:
  
 ====== GetTerrainLOS ====== ====== GetTerrainLOS ======
-GetTerrainLOS(<-start <-endPos <-checkLastCell) ->hit+GetTerrainLOS(<-startPos <-endPos <-checkLastCell) ->hitPos
  
 ===== 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 to endPos and returns the world position (if any) where the line first ever intersects terrain geometry.\\
 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', 'endPos', and 'hit' vars are all vectors ([[V3]]) as floats.\\+-The 'startPos ', 'endPos', and 'hitPos' vars are all vectors ([[V3]]) as floats.\\
 -Returns the world space location of where the collision took place. If no hit occurs then all vector items are -2,147,483,648 (minimum 32 bit number). -Returns the world space location of where the collision took place. If no hit occurs then all vector items are -2,147,483,648 (minimum 32 bit number).
  
4rpl/commands/getterrainlos.txt · Last modified: 2024/04/13 14:27 by durikkan