0
如果有人能幫我解決一個問題。我想要獲得帶有動畫的JSON,以特定的路徑行進。three.js Blender export,object path&rotation
var up = new THREE.Vector3(0,1,0);
var pt,radians,tangent;
var axis = new THREE.Vector3();
var pot = new THREE.SplineCurve3([
new THREE.Vector3(640,360,510),
new THREE.Vector3(650,360,520),
new THREE.Vector3(0,20,0)]);
....
pt = pot.getPoint(stevec);
meshK.position.set(pt.x,pt.y,pt.z);
tangent=pot.getTangent(stevec).normalize();
axis.crossVectors(up,tangent).normalize();
radians=Math.acos(up.dot(tangent));
meshK.quaternion.setFromAxisAngle(axis,radians);
//meshK.eulerOrder='ZYX';
stevec+=0.001;
- 我試圖讓飛機像物體飛了一定的路徑。
由於