Archive 17/01/2023.

Fast quaternion slerp

smellymumbler

Really cool article.

Leith

Nice article!

I had a related issue with Urho’s inability to determine the shortest rotation between two direction vectors (which I needed to implement a basic steering behaviour).
Here’s my workaround:

/// Calculate signed angle between two vectors
float SignedAngle(Vector3 from, Vector3 to, Vector3 axis)
        {
            float unsignedAngle = from.Angle(to);
            float sign = axis.DotProduct(from.CrossProduct(to));
            if(sign<0)
                unsignedAngle = -unsignedAngle;
            return unsignedAngle;
}