提交 21ab28ec 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #12511 from looeee/FBXLoader_rotations_bug

FBXLoader fix Euler.fromArray syntax
......@@ -1796,7 +1796,11 @@
if ( 'PreRotation' in node.properties ) {
var preRotations = new THREE.Euler().fromArray( node.properties.PreRotation.value.map( THREE.Math.degToRad ), 'ZYX' );
var array = node.properties.PreRotation.value.map( THREE.Math.degToRad );
array[ 3 ] = 'ZYX';
var preRotations = new THREE.Euler().fromArray( array );
preRotations = new THREE.Quaternion().setFromEuler( preRotations );
var currentRotation = new THREE.Quaternion().setFromEuler( model.rotation );
preRotations.multiply( currentRotation );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册