Calculate the angular velocity from two rotations a given time apart.

I have an object that the user is rotating by dragging the mouse. When the mouse button is released I would like the object to continue rotating at the same rate the user was dragging it. I have the last two rotational positions and the time between them. I also have the last two positions of a point on the surface of the object. I would like to set the object's rotational velocity from this information.

With Quaternion.SetFromToRotation you can create a quaternion that represents the rotation that happens between those two rotation states. I haven't tested it yet, but if you devide the eulerAngles by your time you get the rotation per sec.

if you use a rigidbody, i guess you can assign that angular velocity to rigidbody.angularVelocity but you have to convert it to radians. See Mathf.Deg2Rad.

As i said, i guess, not tested