I’m rigging up my character for animation, and I’m trying to add
in IK constraints in the legs, for easier animation.
The legs are basically three bones + IK bone (thigh, chin and foot).
The IK bone is just below the foot.
To set up the constrait I selected the IK bone and the chin, and pressed
Shift>I, and added the chainlength to 2. Then in posemode it works nicely, EXCEPT
the thighs swing to the side when I lift the legs upward in a stepping motion
How can I stop the thighs from swinging to the side? Keep it locked on the (in this case) Y axis maybe?
Are you using a pole target? That would be a bone floating in front of the knee for the leg “bend” to point towards.
Normally, the foot bone would be disconnected from the shin bone (unparented and floating free). The shin bone is where the IK constraint gets applied. It has a target of (foot bone) so it ends up sticking to (and following) the foot, chain length f 2 (as you have: shin & thigh) and then a pole target to control the bend direction, with a pole offset (usually 90) to correct if it’s bending offcenter.
Post your rig blend (you can delete the mesh to make filesize small) if you are stuck; there are several things which can make a leg go awol.
Pole Target gives you finer control over where to point the knee. But the more importantly, when you build the knee joint, you need to bend it slightly the way it hinges. If you build straight leg bones, you are not giving any clue to Blender which way to bend it.
Okay I’m not sure how to setup a pole target but if it’s a bone guiding the knees direction that sounds like it would be the answer.
I posted my blend file without my character and a simple animation showing how the knee swings out. If anyone can guide me how to add a pole target that’d be awesome male.blend (273 KB)
Edit: Btw forgot to add that I’m using blender 249.2 because blender 2.5+ doesn’t export to .b3d
I had a look at your file, and it can be fixed with a knee pole target. I’ve added kneepole_L (left leg pole) for you in this update to your file. The offset in this case is -75 (look at the IK constraint settings) but this can change when you add bones etc. Notice that if you move my kneepole around, the leg bend follows the direction.