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;