Here a project that compute the closest distance to a line or to a cubic Bésier curve (can be extended to any Bésier degres but you'll need to setup the math by yourself, and the cubic can do any shapes) press space to switch from bésier to line and vice versa Was a bit bored and decide to make something usefull... it's maybe not that optimized... If you want to use it, you just have to backpack the sprite that you want (or both) and then use it in your proect some informations are provide inside. Just credit please... Credits : # all by @morveman