Oscillate Position on X-Axis Expression

//OSCILLATE POSITION BACK AND FOURTH ON X AXIS:
amplitude = 10;
frequency = 3;
temp=amplitude*Math.sin(time*frequency)+amplitude;
// add the result to the current x pos
temp=temp+transform.position[0];
//plug the new x into slot 0. y is currently left unchanged
[temp, transform.position[1]]
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *