# How to limit inverse kinematics?

I don’t know how to formulate the question correctly. I’m using inverse kinematics to animate a crouch and there is a section on the model that falls through the floor. What constains can be applied to avoid this?

From your captures, it looks like that’s just how your mech is modeled : its “heel” is protruding too much, it’s always going to go through the ground when crouching. I think it’s a matter of character design, not rigging. I would try remodeling that part

2 Likes

The joints allow him to place his leg correctly. The problem is in setting up the inverse kinematics

Oh, right, I see. You can control the ik stiffness on a per-bone basis in bone properties. That usually works well enough, but sometimes it affects other parts of the movement range (=leg extended) in undesirable ways. But usually there’s a sweet spot.

Now something else comes to mind. You could add a manual foot roll on those legs, instead of relying on the ik solver. You’d be in complete control of the angle between the last two bones (preventing the heel from ever going into the ground), at the cost of more animation.

I tried changing the stiffness, but did not achieve the desired result. I really don’t want to do it manually

You could reverse the bones in the leg. Then you can set a limit to the rotation of the ‘Ankle’ bone.

AnkleLimit.blend (128.0 KB)

If you need bones facing the ‘right’ way for constraint purposes, you can add them and make them children of the IK bones.

1 Like

Took a look at this, tried a different approach…

Then I noticed something looking at your screen shot

Are the parts pointed at by the arrows the same part? Because it looks to me like they are both rotating the same, based on the lower leg bone rotation. The heel (yellow arrow) mesh needs to be controlled by the ‘Tarsus’ bone.

Randy

Your IK doesn’t know anything about any floor, that’s not how it works, so there are things that you need to do to adjust it manually. You can still use IK, but you will have to tweak the bones.

When you have a 3-chain like this, there’s more than one way to reach your IK target, and you can rotate bones in the IK chain to change the base angles that the IK is working with, which changes the solution it picks:

I’ll usually give IK bones Euler rotation modes to make this easier, as I did here.

2 Likes

Interesting solution, I’ll try it

Well, that’s a really good method, thanks