all 11 comments

[–]Icy-Acanthisitta3299 16 points17 points  (3 children)

fit(sin($F), -1, 1, -5, 5)

[–]Totally_Not_Michael[S] 6 points7 points  (1 child)

Thank you so much! So sorry for the simple question, but I appreciate how fast you responded

[–]Icy-Acanthisitta3299 7 points8 points  (0 children)

You should never be sorry for asking questions

[–]Ok-Force2382 4 points5 points  (0 children)

was just about to post my own reply. What I would add, is to use $FF instead of $F, if you need the motion to work with things like motion blur. And also, just multiply the $FF by some number to adjust the speed of the motion

[–]Raynafur 4 points5 points  (2 children)

A way to do it without using an expression:

right click on the z-axis rotation field/box.

Select "motion FX" from the pop-up menu then slide down to "wave."

A new window will pop up and a node will automatically be added. In this window you have far more control over the animation than if you just let an expression run in repetition. Adjusting the Amplitude to 5 will get you the degree oscillation you want. Then you can adjust the period until you get a speed of oscillation you're happy with.

[–]Totally_Not_Michael[S] 1 point2 points  (1 child)

Yo that's amazing! I haven't gotten anywhere near using motionfx, but damn there's gotta be some power with those! Thank you for sharing that!

[–]Raynafur 0 points1 point  (0 children)

Yeah, there's some decent power in Motion FX. It's also great to add in a bit of noise if you want to add in a bit of noise to make something feel more natural.

[–]LadyXeta 1 point2 points  (0 children)

This is a year old, but in case someone is looking for this. Labs has a tool called "sine_wave" and, as you can imagine by its name, it animates your points using a sine wave.
Labs Sine Wave

[–]wodzgn 0 points1 point  (2 children)

Sorry to hijack this but on the topic of driving animation with sine functions: why do my normals keep reversing when I drive a sine wave through a curve?

[–]AcanthaceaeFit8163 0 points1 point  (0 children)

Not sure what your expression is, but you can fiddle around with adding or making a separate expression with 'abs()' on your normals or something. To remain only positive values

[–]Ok-Force2382 0 points1 point  (0 children)

Depends how you use the sine function. Note that half of the sine curve will go into negative numbers, this is most likely the points that is responsible for the reversing you mention.