okay i been trying to figure this out for a long time, my canvas is set to Screen space camera and when i set line renderer use world space to true the line is drawing perfectly in editor mode but does not show up in game mode, and when i check false on use world space the line drawing and also showing in game mode but its always drawing from the line gameobject origin not on the position of mouse click …i just want to draw a line with a mouse
Okay, i figured it out the problem was that i was using position instead of local position that’s why my line was not starting from the desired position so instead of using the predefined line rendered object in the scene i am now instantiating it on runtime and using my ScreenToworld as a localpostion for line