GetLineX and GetLineY

From Eternity Wiki
(Redirected from GetLineY)
Jump to navigationJump to search

ACS functions[edit]

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.