gltf animation has wrong orientation if rotation is non zero and no rotation sampler is used
- Dominant language
- C++
- Stars
- 20.5k
- Forks
- 2.3k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 83
Description
**Describe the bug**
object during scaling animation has wrong orientation if rotation is non zero and no rotation sampler is used. Setting a single rotation keyframe(resulting in a constant sampler) resolves the issue.
**To Reproduce**
Steps to reproduce the behavior:
1. load the file `keyframe_rotation_no.gltf`
[keyframe_rotation.zip](https://github.com/google/filament/files/10055922/keyframe_rotation.zip)
2. notice that when no animation is played, the beams are parallel
3. play the animation which uniformly scales one of the beams
4. the beams in the animation should be parallel but they are not. The animating beam now seems to have zero rotation.
**Expected behavior**
Since no rotation sampler is used, the rotation should remain unchanged between animating and not animating. This is the case in other gltf viewers such as donmccurdy's or babylonjs.
The file `keyframe_rotation_yes.gltf` has a constant rotation sampler and works as expected.
**Screenshots**


**Desktop (please complete the following information):**
- tested on filament-1.26.0, filament-1.28.3, https://google.github.io/filament/viewer/
- model exported by Khronos glTF Blender I/O v3.3.32
**Additional context**
We encountered this issue when trying to optimise our animations using gltfpack. We assume it removes animation tracks only containing a single keyframe that has no effect on the already set rotation.
Contributor guide
Assessment
This issue has not been assessed yet.