如何围绕轴旋转 Three.js Vector3?

2022-01-16 00:00:00 rotation vector javascript three.js

如何将 Three.js Vector3 绕轴旋转一定角度?

How to rotate a Three.js Vector3 by a certain angle around an axis?

推荐答案

var vector = new THREE.Vector3( 1, 0, 0 );

var axis = new THREE.Vector3( 0, 1, 0 );
var angle = Math.PI / 2;

vector.applyAxisAngle( axis, angle );

相关文章