- Home /
How to handle high heel footwear in Unity characters/rigs?
I am in the process of designing my female base character, the male is already done. I've come to a point where I need to decide how different types of footwear chosen by a player will effect the in game character rig. At the moment I am using a morph which changes the lower legs from a flat-footed to heel-up position. The good thing about this is that I can apply the same animations to both since the rig itself is not changed at all. The bad thing is that the character is the same height whether wearing heels or not, and if you look close enough you can notice that the lower legs (from the knee down) are shorter when heels are being worn.
The only other way of doing this I can think of is having two separate rigs; a flat-footed rig and a heel-up rig. This seems a little overkill though since the rig would have to be changed out whenever the player decides to change footwear. I am also guessing that both rigs would need to use different sets of animations because the heel-up rig would have extra ankle and toe rotation on the x axis. It also isn't very flexible since two rigs would only allow for two height variations of the feet, when in fact there may be many variations in heel size/height.
Is there a better way to do this? I must be missing something.
High Heeled Foot vs Flat Shoe Foot:
Can you not just displace the rig knee transforms upwards (the animation should just be changing the rotations) ?
Do you mean offset upwards all the bones/transforms above the foot? If so that's a good idea, but wouldn't I need to anchor the toe transforms/bones somehow? Because otherwise the entire rig would simply float of the ground by the offset with the feet still in the "flat-footed" position. Is it possible to anchor specific bones in Unity in this way?
Yes that's what I mean - the only bone you cannot offset is the root bone - in my mixamo rig that is the hips (which does make this slightly tricky - the idea for a taller character is that you would offset the actual transform of the character upwards and then move the elements below that down to compensate for footwear. This works with the animations because animations only move the root bone, everything else is rotations).
Answer by Hamesh81 · Jan 30, 2013 at 03:32 PM
Ok, after some further discussion with others and studying of my own I think I've found a solution for this.
This first part involves creating a separate animation with only the required foot bones being rotated into the "high heel position". Using Body Masks this animation can then be applied over the top of all existing animations (walk, run, jump etc) to add the extra foot rotation of a foot in high heels. The next step is to to adjust the rig position, and collider size and height to ensure that the rig's feet now are not going through the ground with their extra rotation. This creates a flexible solution which allows the same animations to be used. Let me know if you would like more details about this.
Hi, I am doing a similar thing. However, I am not able to mask just the foot and toe bones while using a Humanoid rig. Were you able to make this work? It would be very helpful if you could share some details.
Okay, so I have found a solution to this and it is working pretty fine as of now. 1. I am using a blend shape to raise the heel as you have done. However, ins$$anonymous$$d of making the lower leg shorter incase of a raised heel, I am allowing the toe to dip down below ground level. I am not doing any height compensation now. 2. Then in Unity, I am using Animator.bodyPosition to raise the character up and recover the lost height.
var heelHeightWeight = (heelHeight / maxHeelHeight) * 100f;
smr.SetBlendShapeWeight(heelHeightBlendShapeIndex, heelHeightWeight);
animator.bodyPosition += transform.up * heelHeight;
Answer by whydoidoit · Jan 09, 2013 at 05:43 AM
You can move the transforms within the rig with the exception of the root - this is the only thing the animation actually changes the position of - everything else is rotations (at least presuming the animation is that of a skeleton where bones do not stretch)
So here is an example using a mixamo rig where I've just extended the spine by moving just the spine transform in my rig upwards - all of the animations are playing fine on this character:
Obviously if the root bone is the hips then you might have to compensate by moving the character itself physically upwards to accommodate the height of the footwear -> apply your morph mod and offset the ankle transform downwards by the same amount as you moved the character upwards
Sure I understand what you mean, the problem though is that it's not only a case of changing the transform position, there are changes in the foot bone rotation as well. I've added a screen grab to my answer, please have a look to see what I mean. The left character has one foot and toe bone rotated as an example of a possible high heel position; the entire character has also been lifted higher otherwise the foot would go through the ground. Note that I am rotating the bones/transforms because changing their position with the move tool stretches the mesh.
The main problem here is that when an animation is played the new rotation of the foot is ignored, so for a walk cycle for example the character walks as if they were wearing flat shoes. The animations for the flat shoes would need to have some rotation added to them when wearing non-flat footwear. The only way I can think of doing this is via mecanim's new animation layer system, but I have little knowledge of how to use this yet.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090504im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Help with morphing between meshes? 1 Answer
Skinned Mesh Renderer / Morph 2 Answers
Model's wrist bending looks terrible in unity. 0 Answers
Weightless bones don't get added to SkinnedMeshRenderer bone array?!? 2 Answers
Problem with humanoid rig 0 Answers