0
如果我做的:爲什麼mesh.rotation.set工作但mesh.rotation.copy不?
mesh.position.copy(p);
mesh.rotation.copy(r);
位置將更新,但旋轉不會。如果我這樣做:
mesh.rotation.set(r.x, r.y, r.z);
而是,它的工作原理。 (p和r當然是THREE.Vector3對象)。
如果我做的:爲什麼mesh.rotation.set工作但mesh.rotation.copy不?
mesh.position.copy(p);
mesh.rotation.copy(r);
位置將更新,但旋轉不會。如果我這樣做:
mesh.rotation.set(r.x, r.y, r.z);
而是,它的工作原理。 (p和r當然是THREE.Vector3對象)。
THREE.Object3D.rotation.copy()
以THREE.Euler
作爲參數,而不是THREE.Vector3
。
查看源代碼,以便查看它的功能。
three.js r.70
哦,廢話,這一次我沒有意識到Object3D.rotation是歐拉而不是Vector3。謝謝。 – pixelmike 2015-02-23 14:52:46