I got your response in my inbox accidently deleted my comment, thank you again
"Let’s say you have the vector [5,0,0].
A vector has a direction and a magnitude.
The direction is a line starting at the origin [0,0,0] and going to [5,0,0].
The magnitude is the length of the vector, which in this case is 5. The magnitude of the vector is disconnected from its direction, so no matter what direction it faces, its length will stay the same. The magnitude/length of a vector is always measured as its distance from [0,0,0].
I this case, if we normalize [5,0,0], it becomes a unit vector of [1,0,0]. This is now a direction vector, with a magnitude of 1. Notice how we can change the magnitude of the vector without changing its direction? We take advantage of this to get a random point on your line.
We can now take this unit vector and multiply it by any number we choose – let’s say 15.87. Now your vector becomes [15.87,0,0]. It retains its direction, but is now much further from the origin [0,0,0].
In your game, you’re going to be working with positions which are not at the origin. These are points in world space and you’re going to be working relative to them. To work with vectors, you need to convert these world space coordinates into local space coordinates – this just means you’re translating the origin to [0,0,0] so that you can use vector math.
Example: You have point A at [1,2,3] and point B at [6,7,8]. If you connect A to B, you get the line segment AB. This line segment has direction and magnitude, so it can be used as a vector. To get the line vector, you would subtract point B from point A: [6-1,7-2,8-3] => [5,5,5] [5,5,5] has the same direction and magnitude as line AB, but now its in local space because we shifted Point A such that it is centered on [0,0,0], and point B is on [5,5,5]. Now we can do vector operations on it! When we’re done, we shift it back by adding point A back into it."