so im working on a mini golf game and i want to set the speed of the ball by the distance between the ball and the courser and came up with this soulution
it works but not quite how i want it to. the problem is that u have to move your courser very far away to get a bigger hit and its not consistent like in the first half the speed goes up slowly and the other half it goes up rapidly
so is there a way to make something like a circle around the ball that calculates the distance between the inner circle(Ball) and the edge?
Ok, and are you using a flat ground or does the area have some bumps? I am asking because your Z value could cause problems. You could try to only use the X and Y values of your vectors. And your perspective will generate more distant points even when you only move your mouse a little bit the lower you are with your camera.