【发布时间】:2022-01-30 20:39:37
【问题描述】:
假设我创建了一个箭头助手,例如类似:
const arrowPosition = new THREE.Vector3(0, 0, 0);
const arrowPosition = new THREE.Vector3(2, -2, 0);
arrowDirection.subVectors( scene.position, new THREE.Vector3(1, 1, 1)).normalize();
arrow = new THREE.ArrowHelper( arrowDirection, arrowPosition, arrowLength, 0xffff00, arrowHeadLength, arrowHeadWidth);
创建后如何获取其方向?
【问题讨论】:
-
这能回答你的问题吗? Three JS - Rotate arrow in 3D to track mouse
-
不,该页面上的答案没有显示创建后如何访问箭头的方向。
-
您可以将方向写入助手的
.userData以便稍后获取。
标签: three.js