Hi,
I would like to know if anyone knows how to do this. Do you know this game?
This game is Magink, for android. In it the gamer draw to shape on screen and execute an attack. Yo can see it in min 2:08 in video.
Do you know what information I should check to do this? Or an example that I can study?
Regards!!
There are two parts to this problem: (1) drawing on the screen, and (2) recognizing the user’s input.
For the first part, you might use a LineRenderer or TrailRenderer, or you could use a PixelSurface.
For the second part, there are lots of fancy ways to go about it, but a simple way that works well is to fit a square around the gesture drawn, divide this into (say) 9 sectors, and then extract a string composed of each sector the input stroke hits, in order. So a horizontal line to the right might be 456, while a stroke to the left would be 654, and one coming down would be 852 (I’ve numbered my sectors the same as on a keyboard number pad).
Then, compare this string to a table of recognized input strings in your app, using the Levenshtein distance to figure out which known input it’s closest to.