Hi Unity Community.
So at the moment I’m trying to determine whether there has been a corner drawn in a user input based on a change in direction of the co-ordinates.
The system I’m using at the moment is very makeshift:
I find the direction vector for each co-ordinate
add the direction vectors to a list
every time a co-ordinate is added find the average of the list
if the any of the values of the direction vector of a co-ordinate is in the opposite direction to the average mark this as a corner.
obviously this is very makeshift since It is prone to error (for example if the user has a bit of a wobble in their input or if they’re drawing non-diagonal lines (e.g. a square))
so basically I wanted to find a way to determine whether there has been a significant change in the direction. Any help would be greatly appreciated.