This is a follow-up post to this post: How can I check if a player-drawn line follows a path?. I'm having difficulty implementing the said feature and I believe it's because of a lack of math background.
In particular, the later components of the explanation are a bit confusing to me.
The direction of the projected vector might not actually be important. If you just sum >together the lengths of the projected vectors and compare them to the total length of >the line segment, that will tell you what fraction of it is covered. (Except in odd >cases—see §Limitations below).
In my mind this means
- breaking down a character into line segments, converting them to 2d vectors
- breaking down a user draw character into line segments, converting them to 2d vectors
- mapping each user drawn line segment (now 2d vectors) to the closest character line segments
- using projection for each one of those mapped line segments
- summing up the projections and comparing it to the total length of all 2d vectors of the character
Is my assumption of what the writer is talking about correct? Or am I misinterpreting what is meant by the last bit.