1
$\begingroup$

I have an object that has a driver on the Y rotation. I want the driver to rotate the Y from 0 to 360 degrees in relation to another object's size from 0 to 1.

I usually do this in after effects using a linear() function. What would be the correct expression to make the scale values of the other objects (0 - 1) translate to 0 - 360 rotation on the other object.

$\endgroup$
2
$\begingroup$

Rotation as far as drivers are concerned are in the Radian Units not Degrees, even though on the interface, this is probably what you are used to seeing.

so for the scale (x/y/z) formula it would probably have to look something like the following:

var / (2.0 * 3.14157)

$\endgroup$
  • 3
    $\begingroup$ It's worth noting that drivers use Python's math module, so you can utilize the pi constant and methods like degrees() and radians(). $\endgroup$ – Michael Glen Montague May 29 '17 at 14:58
  • 1
    $\begingroup$ @MichaelGlenMontague - Great point, I couldn't remember if pi was lower case or upper case, so I just got close with the numbers. Also you don't even need it, if you are using the radians conversion function. It would just look like: var / radians(360.00) $\endgroup$ – Rick Riggs May 29 '17 at 15:52
  • $\begingroup$ That was a brilliant answer. I wanted a way to map the 0 - 17 deg range of a bone's rotation to drive the 0 - 1 range of an influence slider on another bone. I just had to use the expression var / radians(17.00) and it worked perfect! Thank you Rick and Michael! $\endgroup$ – Copperplate Feb 1 '18 at 17:03

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.