Resetting the rotation of a OneGrapRotationTransformer
In case someone is struggling to reset the rotation of a Transform which is controlled by a OneGrabRotationTransformer, the only way I've found to achieve that is what's done in this post: Reset a "One grab rotate transformer" | Meta Community Forums - 1269247. TLDR; Create your own OneGrabRotateTransformer, and implement the login in it's EndTransform-method, where you'll be able to fully reset the internal state of the transformer.
public void EndTransform()
{
var targetTransform = _grabbable.Transform;
targetTransform.localEulerAngles = Vector3.zero;
_relativeAngle = 0.0f;
_constrainedRelativeAngle = 0.0f;
}
I'm hoping this gets support in the SDK...
