GetLineX and GetLineY

From Eternity Wiki
Revision as of 15:41, 25 January 2017 by Printz (talk | contribs) (Created page with "==ACS functions== :''fixed'' '''GetLineX'''(''int'' lineId, ''fixed'' ratioAlongLine, ''fixed'' distanceFromLine); :''fixed'' '''GetLineY'''(''int'' lineId, ''fixed'' ratioAl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

ACS functions

fixed GetLineX(int lineId, fixed ratioAlongLine, fixed distanceFromLine);
fixed GetLineY(int lineId, fixed ratioAlongLine, fixed distanceFromLine);

These two functions return the coordinates on top of a linedef tagged as lineId. Other parameters are:

  • ratioAlongLine: 0 means that you get the position of first vertex; 1.0 (65536) means the position of the second vertex. Any value between them is partly between them. Negative values are before the first vertex and values over 1.0 (65536) are beyond the second one.
  • distanceFromLine: the distance in map units perpendicular from the line. 0 means that you get a coordinate exactly on the linedef. Positive values put it in front of the first sidedef. Negative values put it behind.