- Home /
How to create a 2D line between a Game Object and the mouse?
I'm hoping to create a 2D line between a Game Object and the mouse. Both the Game Object and (obviously) the mouse will be moving during the game.
I looked up the LineRenderer component, but it didn't seem appropriate for the situation. My guess is this is best implemented somehow during the OnGUI() function.
Thanks in advance.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613062318im_/https://answers.unity.com/themes/thub/images/avi.jpg)