[Help From Mecanim Devs Needed] How are feet IK rotation values ("Foot Q") calculated?

I am writing an editor script to edit humanoid animations. I have figured out the muscle values, as well as “Left Foot T” and “Right Foot T” which are relative positions from the humanoid hip.

But I have no idea how to interpret the “Left Foot Q” and “Right Foot Q” values which are used by feet IK, i.e., this:

Here’s what I figured out so far:

  1. At T-pose (i.e. feet point forward), the value corresponds to quaternion (0.5, -0.5, 0.5, -0.5), or euler angle (0, 90, 270).
  2. If I set the value to identity quaternion (0, 0, 0, 1) (i.e., zero euler angle), the foot is rotated like below:

If I set both “Left Foot Q” and “Right Foot Q” to identity quaternion, the feet look like below:

I have no idea how I should interpret/edit these values, and can’t seem to find any information from the Internet.

I understand this is an advanced topic, but would really appreciate if any devs from the Unity Mecanim/Animation team can take a look! Thanks!

Pinging the almighty Mecanim dev @anon49125583 since you’re probably the only one in the forums familiar with this topic. Would really appreciate some advice here - thank you! :slight_smile: