[0.17.47] rendering.draw_line(): some lines disappear from screen depending on player position/zoom
Posted: Mon Jun 10, 2019 11:30 am
What's happening:
When using rendering.draw_line to draw a set long & almost parallel lines, some lines aren't rendered on screen. Moving the character or zooming in/out may change which lines are displayed/hidden. Sometimes no lines are rendered at all.![Image](https://forums.factorio.com/images/ext/704b855db676030472bad16d355cb1f8.gif)
Expected behaviour:
(gif made with different line coordinates)![Image](https://forums.factorio.com/images/ext/e53520cd383e3afd82dc13a46dda9bcd.gif)
Steps to reproduce:
- Create a new game
- Run the following in-game command:
Code: Select all
/c for i=1,100 do rendering.draw_line({from={i,0},to={1000+0.1*i,1000},color={g=1,a=1},width=1,surface="nauvis"}) end
- Walk on the right while changing the zoom level