Loaded gltf from url does not play animations

I have a model in gltf that I am loading from url which contains some animation. But the problem is that the animation on it are not playing. I have tried everything want I could do but couldn’t found a way to run them.
This is the pic of the model and animation I am loading.
image
In GLB it is working but not in GLTF.

I load the GLB model by
this.app.assets.loadFromUrl(url, “container”, function (err, asset) {});

I load GLTF model by
this.app.assets.loadFromUrl(url, “json”, function (err, asset) {});
also using the playcanvas-gltf.js file and using the “loadGltf”.

But I found that the animation objs are made different in both cases.
In GLB case


In GLTF case
image

A bit difficult to really tell without an example project, code and the asset.

Does the animations play in the model viewer? PlayCanvas glTF Viewer

Yes it is being displayed in it and it has the animation in it.

In which case, it looks like the code or entity setup would be issue here

Heres an example post of loading a glb with animations GLB - is it possible to make it run in PlayCanvas together with animations and assets(skins, etc.) - #7 by yaustar

1 Like

Thx for help yaustar. I figured it out.

1 Like