This question already has an answer here:
I've made a simple drawing:
The distance between these two points is calculated with a simple formula:
Which gives: 5,38
I need to calculate the green point's coordinates, which is set at 80% distance from the
B point towards the
I could make a direction vector between
B, and then, add
(dir * 5.38 * 0.8) to the
B point itself, but it gives me strange results.
Is there a simpler (and more efficient!) way to achieve that?