Unfortunately this is not what i'm trying to achieve. Basically, I'm drawing red lines from the center of the circle, which are for instance 128px long.
On line of sight of an obstacle, they are supposed to change size, depending on the distance from the center and the point of collision with the rectangle.
At thz moment I can't manage to determine the coordinates of that point of collision to recalculate the size of the red lines in real time.