Comments and answers for "Arc Movement Lerp, Mathf.Sin and Mathf.Pingpong question"
http://answers.unity.com/questions/868207/arc-movement-lerp-mathfsin-and-mathfpingpong-quest.html
The latest comments and answers for the question "Arc Movement Lerp, Mathf.Sin and Mathf.Pingpong question"Comment by Scribe
http://answers.unity.com/comments/868227/view.html
No problem :)Sat, 03 Jan 2015 19:31:37 GMTScribeComment by Inan-Evin
http://answers.unity.com/comments/868226/view.html
Dude you just made me realize the thing, i was so foolish. Thanks dude !Sat, 03 Jan 2015 19:30:16 GMTInan-EvinAnswer by Scribe
http://answers.unity.com/answers/868220/view.html
t = Mathf.PingPong(Time.time * speed, 1f);
pos.y = Mathf.Sin(t*Mathf.PI);
pos.x = Mathf.Lerp(start.x, end.x, t);
The angle given to sin is expected at a radian, and so Sin(0) = 0, Sin(PI/2) = 1, Sin(PI) = 0, hence you want to times your t value (which moves from 0 to 1) by PI so that it changes between 0 and PI!Sat, 03 Jan 2015 19:25:45 GMTScribe