Closed bagidea closed 2 years ago
Hello I'm add gltf model and play animation mixer, But ot not working. I'm using GLTFLoader and Animation Mixer. then I add model by NFTaddTJS. After my tracking my models show but not play animation. Thank you
it could be caused for different reasons. Can you post the model or the code?
Hi. I have the same problem. The animation of the rig does not work. santa3.zip
In the console you can see that the model has no animation, but in fact there is
@bagidea @denisTrubicin93 animations are not working because is not implemented yet. Inside https://github.com/webarkit/ARnft-threejs/blob/16543652f7c2f01fe546b4709b8aa105fcadcab7/src/markermedia/NFTaddTJS.ts#L98 i should add something like:
var animation = gltf.animations[0];
var mixer = new THREE.AnimationMixer(model);
mixers.push(mixer);
var action = mixer.clipAction(animation);
action.play();
I will test when i have a bit of time. :smile:
I'm working on this branch https://github.com/webarkit/ARnft-threejs/tree/feature-addmodel-animations, i will let you know when it's ready.
I created a PR https://github.com/webarkit/ARnft-threejs/pull/28, feel free to comment also there.
I made a working example thanks to the code in #29, see the addModelWithCallback method. You can test the examples/arNFT_gltf_flamingo_example.html
in PR https://github.com/webarkit/ARnft/pull/246.
This is merged in the master now!
Hello I'm add gltf model and play animation mixer, But ot not working. I'm using GLTFLoader and Animation Mixer. then I add model by NFTaddTJS. After my tracking my models show but not play animation. Thank you