Animating with bones:
To start off with, create five boxes to form toes, the foot, lower leg, upper leg and hip, as shown below:
(Doesn't Have To Look like This, just make it resemble a leg with same amout of objects.)
When you have done that link the objects in the following order toe to foot, foot to lower leg, lower leg to upper leg, upper leg to hip.
Now, In the Create menu go to systems and click on bones:
Once you are in the Bones menu click pick root and click on the hip box. You should notice that there are bones running through center of your leg and into your foot. (if your bones don't go in a straight line and/or bend @ the foot or don't look like the following picture, you should go back and adjustyour pivots before linking your objects)
ok, the leg is now boned, select the bone in the foot and move it around.What Happens? the whole leg moves.(before continuing undo any changes made!)
Now we will add rotational limits. These will stop the bones From bending irregulary. To start with, click on the bone running through the lower leg. Now go to the Heirachy Menu and click on IK
Once there, go to the rotational limits menu and the settings to this:
Now to stop the knee from Bending Irregulary click on the bone running through the upper leg and change Its Rotational Limits to this:
Now, Since the knee isn't bending the wrong way its time to work on the Hip Bone.Click on the bone going from the hip bone to the upperleg and change its rotation limits to these:
Now Your Leg should look like this:
Notice the arcs around the joints of the bones. These are the rotational Limits!
To make it a bit more easy to find and select the end bone( the end effector ) I will teach you how to add a dummy to the leg which is a lot easier to see and select:
To create The Dummy, Go to the helpers menu under the create panel:
Make The Dummy and put it in front of the foot like this:
Once the Dummy is made Click on the bone in the foot and go to the motion panel:
Scroll Down until you get to End Effectors: panel and under End Effector Parent Click the Link button then click on the dummy:
Now when you move the Dummy, the whole leg moves with it!