[three.js] [编辑] CesiumMan不能走路

时间:2018-12-10 07:27:53

标签: animation three.js editor

我导入了一个包含动画的gltf(CesiumMan),如果一切正常,它将自动行走,但是当我添加脚本并运行时什么也没发生。   这是我的脚本:

console.log(this);
var mixer = new THREE.AnimationMixer(this);
var animations = editor.animations[this.uuid];
if(animations) {
    animations.forEach((clip)=> {
        mixer.clipAction( clip ).play();
    });
}
function update( event ) {
    mixer.update(event.delta);
}

或看一下这张照片: runtime Info

0 个答案:

没有答案