So ive tried to cast a ray from my enemy to my player and that works fine, the problem is when I try to draw that line something goes wrong. I have not been able to figure this out so I'm asking you.
Code: https://justpaste.it/5a892 (sorry for this weird website, pastern didn't work)
Screenshot of the bug: https://ibb.co/y0fSvvM
This is my first time posting anything here so sorry for any mistakes and also thanks to any help that might come
(also im in 2D and using 3.2.2)