I know coordinates of vectors A and B. How can I count first point between these two vectors? First vector X is 1% of the distance between vectors A and B. So first I will move object in vector A 1% closer to vector B. So I need to calculate vector X that is new vector for object, until it reaches vector B.
Share
You want lerping. For reference, the basic formula is:
x = A + t * (B - A)Where t is between 0 and 1. (Anything outside that range makes it an extrapolation.)
Check that
x = Awhent = 0andx = Bwhent = 1.Note that my answer doesn’t mention vectors or 2D.