- Home /
 
 
               Question by 
               Le-Capitaine · Jun 29, 2017 at 12:29 PM · 
                animationmecanimmirror  
              
 
              Mecanim mirror mode is doing...things.
 
5.6.2f1. No foot IK. This extends to all animations to varying degrees. I don't remember doing anything but updating. I'm using a human rig with a few extra bones and only one spine bone. I've already reimported and regenerated the relevant avatar to no avail.
Here's my import code in case you catch anything in it I didn't.
 ModelImporterClipAnimation[] SetupClips (ModelImporter model)
 {
     ModelImporterClipAnimation[] clips = model.clipAnimations;
     for (int i = 0; i < clips.Length; i++) {
         //TakeInfo takeInfo = importedTakeInfos [i];
         ModelImporterClipAnimation mica = clips [i];
         
         int nameIndex = model.assetPath.LastIndexOf("/") + 1;
         string name = model.assetPath.Substring (nameIndex);
         name = name.Remove (name.LastIndexOf ("."));
         if (name.Contains ("mikeRider_")) {
             name = name.Replace ("mikeRider_", "");
             name = name.Remove (1).ToUpper() + name.Substring (1);
             mica.name = mica.name.Replace ("Armature", name);
         }
         else if (name.Contains ("PED_")) {
             mica.name = mica.name.Replace ("Armature", "Pedestrian");
         }
         else if (name.Contains ("rider_face_")) {
             name = name.Replace ("rider_face_", "");
             name = name.Remove (1).ToUpper() + name.Substring (1);
             mica.name = mica.name.Replace ("Armature", name);
         }
         //mica.takeName = takeInfo.name;
         //mica.firstFrame = (float)((int)Mathf.Round (takeInfo.bakeStartTime * takeInfo.sampleRate));
         //mica.lastFrame = (float)((int)Mathf.Round (takeInfo.bakeStopTime * takeInfo.sampleRate));
         if (!mica.name.ToLower().Contains ("face.eyes.")) mica.maskType = ClipAnimationMaskType.CreateFromThisModel;
         //mica.loopTime = true;
         //mica.loopPose = true;
         if(model.animationType == ModelImporterAnimationType.Human) {
             mica.keepOriginalPositionY = true;
             mica.keepOriginalPositionXZ = true;
             mica.keepOriginalOrientation = true;
             mica.lockRootHeightY = true;
             mica.lockRootPositionXZ = true;
             mica.lockRootRotation = true;
         }
         clips [i] = mica;
     }
     System.Array.Sort (clips, (x,y) => string.Compare(x.name, y.name));
     
     return clips;
 }
 
               I've read some material suggesting this was a recent Unity bug. Bumpy edit before I just cave in and duplicate every affected clip.
 
                 
                dash-unity.gif 
                (472.8 kB) 
               
 
                
                 
                dash-unity-m.gif 
                (467.9 kB) 
               
 
              
               Comment
              
 
               
              Your answer