I’m trying to animate a quaternion to rotate multiple times (more than 360 degrees).
it doesn’t seem to work since 1 or more complete turns are the same as no turns at all and for eg 1,5 turn is the same as 0.5 turn
There’s no way to have quaternions (or rotation matrices for that matter) encode a rotation outside the 0…2*PI range because of the way they are constructed (they use the sin/cos functions).
The easiest way would be to reschedule the animation once it is over (with animationGroup.onAnimationGroupEndObservable for eg).
Or you can loop the animation and stop it after some time.
I totally agree. but looping or rescheduling it onAnimationEnd will not be the optimal solution if we’re sequencing multiple animations. (e.g :object rotates on Z axis 45 degrees, then perform a 360 on Y)
I think to most optimal solution here is to add that middle keyframe, but it will have a not smooth output if the animation has an easing applied, Like so :