Limit rotation constraint not working in local space

I’m trying to use an empty as a joint that is limited to one axis in local space. This works fine when I have the empty at zero rotation however when I have the empty rotated at something like 45 degrees, the limit rotation constraint snaps the empty back to zero then applies rotation.

RotationConstraintIssue

I understand that this issue may be something simply inherit to the constraint due to it being only euler rotation?

I have a bit of a different use case here so please bear with me as this may be easier to do with armatures, however I’d need to avoid using them. This is for an open source addon that will be used for robotics applications and used by users who may not be familiar with Blender. Because of this it would be great to have a more simple rig.

I’m open to other options that might make more sense as long as it avoids a complex bone setup and has a single control object as a joint that can control its child object while still being able to constrain the rotation in local space. In the blender documentation it mentions using drivers for more flexibility but I can’t find any example of drivers being used for rotation constraints in local space.

Any help would be greatly appreciated. I’ve been pulling my hair out trying to figure out a solution for what seems like a very simple problem.

When you re-enable the limit location constraint, it isn’t immediately applying it’s effect. Once you start to rotate it, then the logic kicks in and undoes the other rotattion that you had applied while it was disabled. The display of the rotation axis also gets a little confused, as it doesn’t match what the constraint is trying to enforce.

If you want to be able to position and rotate the empty in world space, but also limit the rotation axes, you can make it a child of another empty. Use that parent empty to move it into place, then you can do the local limited rotation on your initial empty. That will happen in the ‘space’ of it’s parent, so it’s local coordinates will be based on the rotation of it’s parent.

Depending how many parts you want to animate, you may be better off using bones in an Armature instead of Empty objects. That will make any animations all live within the same Action. Otherwise, there will be an Action created for each empty object that is animated. You may not need to add the extra parent bone using that approach, as the zero ‘rest’ position of the bone will be set to however it has been positioned in Edit mode.

Thanks for the help! I ended up going with bones. I think I tried every way to make rigs with object constraints but it’s just too limiting and buggy. Bones and bone constraints just seem to work as you would expect them to. In the end users won’t be animating with these rigs, only setting up joints and constraints.

1 Like