You can use the âshape painterâ-object for that.
You can use a raycast for checking the position of the wall and you can also use the raycastâs variables for determining the end of the line of the shape painter.
There is a good example that demonstrates how it works:
Thank you very much for the answer! I tried to do it.
But there was a problem. Shape Painter does not draw a line. The values of the ContactX and Y variables change. What could be the problem?
IDK how familiar you are with the shape painter. Just some things that weâve all done.
Is there a shape painter on the scene? It happens. Does it have a higher z-order value? It might be covered by another object like the background. In the settings, is the âdraw the shapes relative to the objectâ checked? If checked, the objects x,y act as the origin and the x,y are added to itâs position. I usually uncheck it. Is the âclear the rendered image between each frameâ checked? If check then make sure the draw action is able to be triggered continuously while you want the line to be seen. Otherwise, itâll draw it and disappear. You can uncheck it and then clear the image manually with its âclear shapesâ action.