I'm trying to get an object to rotate with mouse but only in the Z axis. The Quaternion gives me four outputs but I want to convert it so I only get the rotation on the Z-axis. I found equations that can convert it back to axis-angle but not sure how to set it so the rotation only stays in the Z-axis. Should I try other approach?
Quaternion rot = Quaternion.FromToRotation (a, b);