Limit bone rotatation in IK to hinges of mesh

I rigged the legs with IKs. Now how can I limit the rotation of the bones so they only rotate as the hinges would allow them to? Id have to use the local axis of the mesh or so as it has to be pretty precise for a mechanical part. How would you do that or are there any easy solutions?

have you tried in Pose mode, in the Properties panel > Bone > Inverse Kinematics, enable the Limit options

Yeah, and the limiting itself works but I dont know how to set up the axis properly as the bone axis arent the same as the mesh :confused:

so I guess you need to align the bones orientation with the meshes orientation in Edit mode?

How exactly?
Also I doubt Eyeballing will be precise enough so I need a way to align them directly

in the Properties panel, change the display mode of your bones to Octahedral, display the axis:

In Edit mode, rotate your bones with Ctrl R so that they align with the mesh orientation:

2

Give each bone the limits you want:

1 Like

Uh thanks! That kinda works but is not really precise :confused: is there a way to align them exactly?

it depends, if your mesh is align with the global axis it will be easy, select the bone and Shift N > Recalculate Roll, if it’s not there must be a way but it makes things more difficult

Yeah its not unfortunately :frowning:

you could select a face of your mesh (in Edit mode and Face Selected mode), then shift numpad 7 to align view, then select the bone and Shift N > View Axis, but it seems a bit tedious…

1 Like

I often use recalculate roll (ctrl n) -> to cursor to set exact bone rolls. You can snap a cursor to some vertex marking the front/side/back of your knee and then do that. It points the bone’s +Z at your cursor, but if you want something else, you can add multiples of 90 degrees to the roll.