2D mouse input path draw and character follow

Hi,

I’m really new to Unity. I’m working on a project for school and creating a 2D game with multiple levels and interactive functionalities. One of the gameplays consists of the user drawing a path with the mouse (the path is always updating with where the mouse) and having the character move onto that path and run along it, very similar to Kirby Canvas Curse for DS:

(a good example is at 1:20).

What’s the best way to go about getting the path from mouse input, drawing it to seem continuous and mapping the character to run on it? I’m working in C#.

You could use the LineRenderer component, adding vertices as you move the mouse. Then you could determine when to place a new vertex based on distance and or angle compared to latest placed vertex/segment.
Then to have the character run along it in 2D, you would first determine which two vertices bounds the character at any given moment, and then use trig to calculate where on the segment you are. Something like that