Open magcius opened 4 years ago
Oh, that is a bug indeed. I'd gladly accept a PR that fixes this.
(Other reference for myself https://github.com/FlaxEngine/FlaxAPI/blob/master/FlaxEngine/Math/Quaternion.cs#L743 )
And one more: Unity as well (https://github.com/Unity-Technologies/Unity.Mathematics/blob/master/src/Unity.Mathematics/quaternion.cs#L563-L572).
This is far from the first time I've seen this :) . I'm slightly worried about back-compat, but I think pretty much everybody wants the fixed behavior.
If you're worried about backwards compatibility, I can add this to the 4.0 milestone.
(Though, the 4.0 milestone isn't progressing very fast, because on one hand I'm waiting for WebAssembly to become better and on the other hand, I'm busy with other projects and pretty much have abandoned WebGL. Thus, I'm not using gl-matrix for anything.)
I was wondering why I was seeing incorrect results with quat.lerp, until I realized it's just a vec4 lerp and isn't a quaternion lerp at all! A proper quaternion lerp would look something like this:
( Reference, if necessary: https://fabiensanglard.net/doom3_documentation/37725-293747_293747.pdf#page=4 )