0

i have a question to find the x,y,z of point on the line. i have start and end posint of line. how to calculate any point on the line(between start and end points) by distance? an example image are bellow. Thanks.

Example 1 Example 2 Example 3

1
  • The example images are not helping. What distance are you attempting to determine? Or maybe I don't understand the question. Are you wanting to know how to determine the coordinates of the point if you know the distance from the point to the person? I'm not sure what you're asking.
    – lurker
    Aug 8, 2013 at 16:43

1 Answer 1

2

Create a normal and multiply it. I'm pretty sure there are better ways to do that though. =)

Vec3 BA = B - A;
BA.normalize(); // you have the direction
Vec3 Dist = BA.mult(distance);
Vec3 Result = A + Dist;
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.