line rendere not aligned with collider

i’m raycasting, then drawing the line with line render 2d and adding edge collider 2d.
but these lines are differently placed.
what causes this?
113266-untitled.png

found the problem.

the points in the collider are in local space, while my linerenderer was configured to use world space.

while i want to use worldspace in both, i called transform.InverseTransformPoint to initialize the collider