I am doing a Hiragana learning game in unity. However, I am wondering how to do the stroke orders just like Learn Hiragana for beginners - Online Hiragana lessons
It can be exactly the same as the idea of the website above just playing the stroke orders animation or requiring user input to draw the stroke following fixed path. Anyone can give me the idea as I am new to unity.
Step one: find or author a stroke-order SVG or similar format. Review it for accuracy, as I have seen some that claim the correct stroke order but are not correct.
Step two: parse that data into something you can use more directly, like a series of bezier curve segments, ideally with a stroke width at each node along the curve.
If you’re going to require the user input to draw a stroke, and then detect if it resembles the currently expected stroke, then you will need to know quite a bit of curve mathematics to correlate two strokes to see how different they are, on the criteria you choose-- starting position, direction, curvature, midpoint position(s), ending position.
Just a warning, this is not a “new to Unity” kind of project, by the way. It’s going to take a while to learn your way around, and you should probably do some Unity Learn project(s) to get comfortable with the way things get put together. If you’re not already a C# coder, that’s another skill you should try to build before tackling this.
Thank you so much for your advice. It is helpful for me.