modelViewer animation plays in the preview but not in the XR/AR space #2970
-
I've linked an animated .glb file, in the modelviewer tag. When visiting the link, the poster will show for a few seconds and then the model animation will play with a button under it to view in the AR space. When the button is pressed, the model appears in the space but the animation doesn't play anymore. Does anyone have any suggestions? I've looked at the model on https://gltf-viewer.donmccurdy.com/ and there aren't any errors there. I also tried animating a basic blender cube, and still have the same issue. I'm wondering if it has anything to do with the way the file itself is animated. Here is a link to the code: https://glitch.com/edit/#!/speckled-therapeutic-gum I should also note that this is on IOS, I have not tested using android. thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm searching for the same feature too. Up |
Beta Was this translation helpful? Give feedback.
-
I might be wrong, but looking at the code you provided, there is no ios-src, therefore you will not be able to play any animations currently from the auto-generated GLB to USDZ. As stated here. I think in order for you to want an animation to play in both IOS and Android, you will need to provide two separate files (GLB/USDZ) that include the animation. |
Beta Was this translation helpful? Give feedback.
-
To get the animations to play on an iPhone, I had to convert my GLTFs to USDZ files. They worked fine on Android, go figure. I uploaded my models to Sketchfab and then exported them as USDZ files. This was much quicker than using this library, which you have to install a ton of dependencies to get working. |
Beta Was this translation helpful? Give feedback.
I might be wrong, but looking at the code you provided, there is no ios-src, therefore you will not be able to play any animations currently from the auto-generated GLB to USDZ. As stated here. I think in order for you to want an animation to play in both IOS and Android, you will need to provide two separate files (GLB/USDZ) that include the animation.