Let's see if I can say it right:
Subtract
B by
A and you will get the vector that goes from
A to
B.
Normalize it so it becomes with length 1.
Than multiply it by the length between points (as you defined it)
PHP Code:
xs_vec_sub(b,a,c)
xs_vec_normalize(c,c)
xs_vec_mul_scalar(c,lengthBetweenPoints,c)
Now C is a vector with the direction from A to B and with length as you defined between points.
So, now to get the point
N from
A you will do:
PHP Code:
new n = 3
new Float:nOrigin[3]
xs_vec_mul_scalar(c,n,nOrigin)
xs_vec_add(nOrigin,a,nOrigin)
Edit: if you want all the points in between you just have to do in the last step:
PHP Code:
for(new i=0;i<=lastPoint;i++)
{
// use "a" here
xs_vec_add(a,c,a)
}
__________________