# How to limit the rotation of a bone in an FK chain?

Im using metarig to rig a model of a robot and the arms and legs have brackets connecting the joints where rotation in a certain axis would cause part of the model to twist into the mesh of the bracket. To stop this from happening I want to limit the rotation of the middle FK but after messing with every possible combination of constraints and rotation locks I still cant get it to work. I have attached an image of the arm I am working on.

just add the limit rotation bone contraint to that bone, and uncheck the axis that you wont use and then play with starting and ending rotation, for example if you want it to have a limit of 90 degrees just add 0 deg as starting and 90 as ending and thats it.

The best thing to do for a single-axis joint:

1. Specify an Euler transform in properties/transform/mode, with the axis of rotation as the first angle;
2. Transform lock all rotation channels other that the first Euler axis;
3. As needed, provide a limit rotation constraint, in local space:

I'm distrustful of using anything other than the X axis for your primary axis, and would recommend rotating your bones' roll to achieve this, even though I'm using Z in this picture (as a test) and it seems to work.

For a two axis joint:

Use a single bone IK chain track the control bone's tail, and then set IK angle limits. Don't try to use limit rotation constraints to achieve this, you'll just get interpolation problems that you may not even notice until after spending a week rendering.

(Or, track a marker bone that is parented to a control bone, and shrinkwrap constrained to a mesh that is parented to the control's parent.)