BABYLON.Animation rotation.y not working on loaded gtlf

hi, I’m trying to animate the rotation of my loaded gltf mesh, but it’s not working, I tried it on a newly created cube it works on that.

rotation aninmation can work on cube

rotation aninmation cannot work on mesh

You should use rotationQuaternion instead of rotation

cool right now’s it’s rotating, but it’s also streatching the mesh weirdly

Another way is just to null the Quaternion first, then use rotation.

newMeshes[0].rotationQuaternion = null

Example - https://playground.babylonjs.com/#2KRNG9#2966

2 Likes

Welcome to the forums!

The suggestion from @labris should work. You might also want to read up on Quaternions. Animating just one component of a Quaternion is not going to do what you want. :slight_smile:

Quaternion - Wikipedia
Quaternions - Visualisation

2 Likes

cool, it works now.Thanks!

1 Like