0
$\begingroup$

I have an empty object driving a cylinder (X) Rotation by empty (Y) Location. Is there any way to maintain Cylinder (X) Rotation on positive values even if I move the empty (Y) Location to negative values?

$\endgroup$
2
  • 1
    $\begingroup$ Do transformation constraints (the little chain link icon tab) do what you want? I'm not able to check right now but I believe they override driven values in precedence. $\endgroup$ – PGmath Feb 22 at 13:38
  • $\begingroup$ I already tried transformation constraint but as long as I moved the empty to negative direction, the cylinder also rotates on negative X rotation $\endgroup$ – Geovanie Orcullo Feb 23 at 0:28
3
$\begingroup$

Yes, though you may need to change the driver to a scripted expression (easy to do). See The Blender Documentation for more info.

I’m guessing you copy-pasted the driver.

  1. Right-click the driven property (purple) and click edit driver.
  2. In the appearing dialogue, change the mode from averaged sum to scripted expression.
  3. Put an abs(...) around the variable now in the scripted expression field to take its absolute value. For example, if the variable was position the code should be abs(position).
$\endgroup$
2
  • $\begingroup$ Thank you so much. $\endgroup$ – Geovanie Orcullo Feb 23 at 0:22
  • 2
    $\begingroup$ @GeovanieOrcullo If you wanted to constrain the value to some other range you could use the min() and max() functions instead of abs(). $\endgroup$ – PGmath Feb 23 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.