# How to make multiple objects rotate and retract with an equal offset around a point?

I'm trying to model something to be retractable and I can't figure out how to make the parenting system. The idea is that once the first shape hits a distance limit the second piece starts moving, then the 3rd, 4th etc.

Is that done with drivers? Constraints? A general idea would help me a lot already.

Thanks!

## Drivers with IF conditions expression

As you mentioned, you could link the rotation of the pieces with a driver. In the expression you can use a ternary conditional operator (see for example: Is it possible to put an if statement into the scripted expression of a driver?) to make the rotation occour only when one reach te other.

Here's an example using this statement:

var if var>0 else 0


Given that the 2nd bar has on Z rotation=0° and the first one on the bottom something like -30°... the rotatation will be equal to Z until the first bar reaches in its rotation a value higher than zero. From that point going on the second bar will pick a rotation equal to the one of the first (var).

For subsequential pieces, you should just add an angle offset in the expression. Here's some examples:

Final result of the rig:

• This is amazing and beyond what I expected for an answer. Thank you so much Carlo, I'll use this technique in a bunch of stuff from now on. Hope you have an amazing week and thanks again. :') Feb 27, 2023 at 19:08