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