render.drawLine lag?

When i use render.drawLine the line does not keep exactly with objects as they move and it has noticible lag when updating position, is this just a thing i have to live with or am is there something i could do to fix it?

render.drawline uses a post draw

use a mesh polygon scaled to a line instead that is 1 unit long, with the origin to one side

move it to point a,
align it to point b,
and scale it the distance

it also costs less per entity then per render.drawline command.

If you use a post draw callback, it will function correctly. The reason is that velocity is applied in the physics stage, and that happens after logic (but, importantly, before drawing callbacks)