Alternative to LERP and SLERP (BURP)

Normalized Quaternions are unique (except the negative version = positive version), Euler angles aren’t.

So comparing Quaternions is actually better than comparing Euler angles. There can be multiple sets of euler angles that lead to the same quaternion. And Quaternion.toAngles() is only going to give you one representation of that.

For small Quaternion differences then it is sometimes safe to compare the toAngles() of those two quaternions… but I personally wouldn’t trust its accuracy.

There are many ways to do steering, though… and Quaternion slerp()/nlerp() are not really steering primitives… they are animation primitives. They will give you a smooth quaternion interpolation but they will not at all (not even close on their best day) provide anything like attitude control outputs.

For those, the best bet is to use a direction vector of the second quaternion projected into the space of the first (for just yaw+pitch) and then calculate steering from that. (Edit: in case it wasn’t clear, for roll you also need a second vector: left or up, for example)

1 Like