Home Website Youtube GitHub

Help with pivot angles for the feet controls

Hi,

I am new to mgear and I dont have ideas how to fix my problem so any suggestions would be appreciated!
I received a model with its feet pointing outwards
I cant touch the model and point the feet straigth forward. When I build the leg and foot chain, mgear gives me this:
Pics
The ankle control is pointing Z+ and when I rotate it, it has a “nice” offset with the model.
Anyone have an idea how to fix this?

same problem here…

even if the leg component matches the rotation of the mesh (this leads in right knee-up-vector), the leg ik’s and foot roll pivots are building in world space +Z and are not aligned to the foot…

does somebody has an idea, how to get the right
axis aligning to the leg?

As far as I know, in my little experience, feet needs to be aligned with z axis in order to work right with the legs components.

hi,

i found the problem for that. but it needs some modifcation to the components init.py scripts…
here the original snippet of leg2jnt 01…

it uses some false transformation matrix…

self.ikcns_ctl = self.addCtl(
            self.ik_cns,
            "ikcns_ctl",
            transform.getTransformFromPos(self.guide.pos["ankle"]),
            self.color_ik,
            "null",
            w=self.size * .12,
            tp=self.root_ctl)
        attribute.setInvertMirror(self.ikcns_ctl, ["tx"])

        m = transform.getTransformLookingAt(self.guide.pos["ankle"],
                                            self.guide.pos["eff"],
                                            self.x_axis,
                                            "zx",
                                            False)

        self.ik_ctl = self.addCtl(
            self.ikcns_ctl,
            "ik_ctl",
            transform.getTransformFromPos(self.guide.pos["ankle"]),
            self.color_ik,
            "cube",
            w=self.size * .12,
            h=self.size * .12,
            d=self.size * .12)

the transform matrix m is not used in the ctrl creation, it takes the guides ankle transform…

here the corrected one…here the m matrix defines the orientation of the IKs…

m = transform.getTransformLookingAt(self.guide.pos["ankle"],
                                            self.guide.pos["eff"],
                                            self.x_axis,
                                            "zx",
                                            False)

self.ikcns_ctl = self.addCtl(
            self.ik_cns,
            "ikcns_ctl",
            m,
            self.color_ik,
            "null",
            w=self.size * .12,
            tp=self.root_ctl)
        attribute.setInvertMirror(self.ikcns_ctl, ["tx"])

        self.ik_ctl = self.addCtl(
            self.ikcns_ctl,
            "ik_ctl",
            m,
            self.color_ik,
            "cube",
            w=self.size * .12,
            h=self.size * .12,
            d=self.size * .12)

here is the fixed leg2jnt 01 and leg2jnt 02. it goes to the shifter classic comments folder
fixed_shifter_classic_components_legsIK.rar

i think all the leg components will have this, so if anybody uses something else than leg 01, 02 it has to be modified also in the others…
maybe the dev-team can make a permanent fix when it comes to updates.

2 Likes