简体   繁体   中英

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

如何围绕轴旋转一个Three.js Vector3一定的角度?

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 );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM