有很多方法可以做到这一点。一种不需要太多数学知识并让 Three.js 处理繁重工作的简单方法是使用嵌套在另一个对象中的Object3D:子对象是“环”,父对象将环移动到中点并“看起来”沿着线向下,使其垂直。// Create end vectorsvar v1 = new THREE.Vector3(1, 3, 5);var v2 = new THREE.Vector3(7, 8, 10);// Get midpointvar mid = new THREE.Vector3();mid.addVectors(v1, v2);mid.multiplyScalar(0.5);// Nest child object inside parentvar parent = new THREE.Object3D();var child = new THREE.Object3D();parent.add(child);// Set child position to any point in the XY plane with radius = 1// This is a point in your "disc"child.position.set(0, 1, 0);// Move parent to midpointparent.position.copy(mid);// Rotate parent to look towards end of the line// This makes the "disc" perpendicular to the lineparent.lookAt(v1);// Get world position of child var discPoint = new THREE.Vector3();child.getWorldPosition(discPoint);console.log(discPoint);的本地位置child仍然是[0, 1, 0],但是在平移和旋转父级之后的世界位置就是您正在寻找的答案。或者,您可以简单地使用Object3D.localToWorld,但我认为这个父/子示例可以更清楚地说明该过程。