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.
Asked
Active
Viewed 35 times
0
-
Something like the ping pong node https://youtu.be/9y0HHYD7Lxo – Rick T Jul 16 '23 at 16:55
-
using python? https://blender.stackexchange.com/questions/270888/draw-a-sine-wave-from-a-revolving-unit-circle-in-blender – Harry McKenzie Jul 17 '23 at 10:09
2 Answers
3
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
GeorgFK
- 181
- 7
-1
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.
L0Lock
- 15,965
- 1
- 20
- 44
Nanyak Famwang
- 11
- 3
