Animation rotate with Ani.Mate

Hi, I'm using AniMate in C# to do some animation in script. I only have some problems with rotation. This is what I did:

Hashtable props = new Hashtable();
props.Add("position", new Vector3(0, 0, 0));
props.Add("rotation", Quaternion.Euler(30, 0, 0)); //dispatches an error
props.Add("easing", typeof(Ani.Easing.Quadratic));
props.Add("direction", Ani.Easing.InOut);
Ani.Mate.To(transform, 1, props);

When I execute this I get the following error:

Ani.Mate.Error: Cannot animate UnityEngine.Quaternion with target UnityEngine.Quaternion: Operation +, - or * not supported. (System.MissingMethodException: Method not found: 'UnityEngine.Quaternion.op_Subtraction'. ...

Does anyone know what is going wrong here?

BTW I'm using AniMate version 2.0.

I figured out what the problem was. I did not add the 'drive' property and apparently this is mandatory.

props.Add("drive", typeof(Ani.Drive.Slerp));

So the code should look like this:

Hashtable props = new Hashtable();
props.Add("position", new Vector3(0, 0, 0));
props.Add("rotation", Quaternion.Euler(30, 0, 0)); //dispatches an error
props.Add("easing", typeof(Ani.Easing.Quadratic));
props.Add("direction", Ani.Easing.InOut);
props.Add("drive", typeof(Ani.Drive.Slerp));
Ani.Mate.To(transform, 1, props);

From the link you posted, read the section on "Special Cases > Animating Rotation". You aren't using the Rotation component with "To" properly.

http://www.unifycommunity.com/wiki/index.php?title=AniMate#Animating_Rotation