My Armature model is a biped creater that has 4 bones per leg. thigh,calf, foot and then an IK bone. I have the x and y axis locked but as you can see with the blue line the z axis should allow the knee to move in the right direction. However If you look in the picture the blue line show it should allow the knee to bend like a human knee. Any advice would be appreciated.
Here's the blend file. The right leg when you are looking at the cannon head on is the one with the axis locks.