I’m wondering if it is possible, and if so how, might I, in Unity record lines drawn by touch?
Finger swipes from point A to point B. I want to capture that “drawing” on a gameObject in unity(a plane). So the game prompts the user “Draw a hat in the pop up box” the user draws with their finger, they click ok. That drawing is captured and set as a texture for a plane.
Any ideas? I’m stumped on this one.
There’s a simple example of this kind of thing in this thread. Basically, it comes down to sampling the mouse/finger position at regular intervals. A simple version of this might just draw a splodge of “paint” at each position, but you could refine it by interpolating with lines or curves in between. You may find that the iPhone doesn’t update the texture fast enough, so you might want to use a line renderer to show the drawing while the users works on it and then create the texture from the sampled points once it is finished.
Thanks Jimmy, great tutorial!