Direction of knee is not right when bending

Your leg bones are bent so the knee is behind the line from foot to hip - just move them forwards, in EDIT mode, of this theoretical line, yours below (knees bend backwards):


Required Mod (knees bend forwards):


Then it works… You should NEVER have the bones in an IK chain straight - always bend them slightly in the direction you want the “knee” to move in, then they will fold the way you wanted.

Cheers, Clock. :slight_smile:

EDIT:

This is what your model looks like with a Subsurf Mod in place:


2nd EDIT:

You have no “root” bone - this should be between the feet on the floor and major bones like the lower back and all IK targets should be parented to it so you can control the whole character - see the Rigify Rig as a perfect example of what a biped armature should look like.