Hi all,
Basically I need to move the player from position A to position B (image).
To achieve this I am comparing the Touch X position with player X position. I do the same with Y.
Based on the results of the comparison, I move the player to the touch position regardless where it is.
The problem is that if X is shorter than Y, it moves horizontally than it moves vertically but it never moves diagonally. The same happens when Y distance is shorter than X. (image on the left)
I am trying to achieve (image on the right) without the chopping issues.
Thanks,