- Home /
Design question/multiple technical questions
Moving line vertices with mouse
Hi,
I have an object with line renderer with 2 vertices. I wold like to be able to move/add/remove those vertices at runtime with mouse. How can i do that?
Design question like this one are better suited to the Unity Forms. You have multiple technical problems with multiple possible implementations. Unity Answers is designed for answering a single, specific technical question. One approach is to have a generic list of either game objects or transforms. The line renderer would draw a line between the positions of the game objects in the array. Deleting an entry in the array removes a vertex. Adding a new object, inserts a vertex. $$anonymous$$oving the object, changes the position of the vertex. This is just one approach.
Follow this Question
Related Questions
Smoothing a line? 0 Answers
how to skethup lines at runtime with mouse position 1 Answer
Make a dotted line from an object to the mouse 2d 2 Answers
Line render is choppy 1 Answer