0
$\begingroup$

I want to make a to and fro motion on x using a sinusoidal equation. I saw it on a tutorial recently but i can't find it again.

$\endgroup$
2

2 Answers 2

3
$\begingroup$

Add a location keyframe for your object anywhere by hitting I in object mode and choosing Location.

In the Graph Editor select the keyframe for the X value, then go to the properties panel (hit N if you don't see it).

In the Modifiers tab choose Add Modifier > Built-In Function

enter image description here

$\endgroup$
-1
$\begingroup$

Click the object's X Location to edit it, and type in #sin(frame/20).

This will create a driver with a scripted expression sin(frame/20) which sets the X location to the SIN of the current frame value divided by 20. Making the cube move on X between -1 and 1 every ~63 frames.

$\endgroup$
2
  • $\begingroup$ Hello, could you please tell a bit more? $\endgroup$
    – moonboots
    Commented Jul 17, 2023 at 13:46
  • $\begingroup$ A simple back and forth. Or up-down continuous motion. $\endgroup$ Commented Jul 17, 2023 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .