#Animation doesn't play in three editor

4 messages · Page 1 of 1 (latest)

uncut ruin
#

Trying out exporting a character with predefined animations for the first time. I added a very basic PoC HeadTurn animation to this char, exported glb with animation checked and when I open the glb up in https://threejs.org/editor/ I can clearly see the HeadTurn animation is there, but pressing play does nothing.

Any idea what I'm doing wrong? There are multiple moving parts in the PoC HeadTurn animation, but they are all driven by armature keyframes — just in case that's relevant.

uncut ruin
echo arch
#

in three you have to create mixer
on load look animation example

#

`if( gltf.animations ) {

mixer = new THREE.AnimationMixer( gltf.scene );
let i = gltf.animations.length;
while(i--){
actions[gltf.animations[i].name] = mixer.clipAction( gltf.animations[i] );
}
}`