Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个问题要找到线上点的 x、y、z。我有行的起点和终点。如何按距离计算线上的任何点(起点和终点之间)?下面是一个示例图像。谢谢。
创建一个法线并将其相乘。我很确定有更好的方法可以做到这一点。=)
Vec3 BA = B - A; BA.normalize(); // you have the direction Vec3 Dist = BA.mult(distance); Vec3 Result = A + Dist;