[SOLVED] GLTF Loader - Camera animation won't play

Hello guys , i’m having some problem showing the animation camera.

  1. I used a modified code of the GLTF example code
  2. This is the link at my page
  3. Using gltf viewer online i can play the camera animation perfectly (only a basic movement)
  4. I create only two cameras and only one have an animation. I can switch between cameras but the animation doesn’t play…

It’s work’s perfectly but i can’t play the animation like the same model with gtlf viewer online.
Can you help me please?

It looks like you’re creating new cameras using the same settings as the ones included in the glTF asset, but never rendering with the originals. It’s the originals that would be controlled by the animation in the file. Why not something like this, instead?

camera = gltf.cameras[ 0 ];
2 Likes

LOL. Amazing … thank you donmccurdy as ever …

1 Like