Rotation goes from positive to negative midway (drivers)

I have a simple driver rotation on Y axis and the rotation works fine if I leave the variable as (-var) But as soon as I add modifier(generator) to slow down the rotation or use the expression (-var*0.18) the animation does a jerk at the middle and shifts from positive to negative.

Those Transform Channels give you rotations that are in the range -π to π (-180° to 180° ) and the values “wrap around”. So, scaling the rotation of one object based on the rotation channel of another object is dangerous.

Instead use the Copy as New Driver feature on the Y rotation of the main cog:


…and paste that as a new driver into the other cog’s Y rotation and then the scaling factor in the driver expression should work.

You could also use rigs, like in one of Johnny’s new tuts.

Good luck.

2 Likes

My other cog (smaller one) is spinning on the basis of regular keyfyrame animation. Only the top big gear needs to be slowed down.

Yes… I know. Assume “main cog” to mean the one that the driver is getting its rotation variable from.

That’s what “scaling the rotation of one object based on the rotation channel of another object” means.

I can clearly see in your screenshot that you’re using a Transform Channel as your driver expression variable. Don’t do that… and go re-read my previous response.

Good luck.

3 Likes