How to limit a constraint?


I added a transformation constraint to a gear, its target is a second gear with cogs only on one half. So the constrained gear should rotate accordingly. How can this be done? Thank you.

Since you only want the z rotations you could just use a copy rotations constraint, z, invert, and a limit rotation with the appropriate min/max values.

Thanks, this works for a simple case like the one above. What if the target of the constrained gear has a more complex distribution of cogs requiring more than one limitation of rotation? E.g.

Depends on the case, but I’d just use drivers for scenarios when things get a bit more complicated. You can have multiple driver objects.

Could you please outline how to do it for the last example - I added a driver to the big gear’s z-rotation, which sets it to var = z-rotation of the driving gear plus a modifier (generator) to make it rotate correctly to the opposite direction with half the speed. But how do I apply the different limitations?

I don’t think you necessarily need a generator, you can just set an expression for your variable, for example (var / 2) *-1.

As for limits, you can still add a limit rotation constraint, that’s probably the easiest- can be done inside the driver editor as well though, you can use bools, <>, play with different expressions, it’s pretty flexible.