Comments and answers for "How to create a damped harmonic oscillation?"
http://answers.unity.com/questions/327529/recreate-a-realworld-model-spring-board.html
The latest comments and answers for the question "How to create a damped harmonic oscillation?"Answer by MountDoomTeam
http://answers.unity.com/answers/330190/view.html
Hiya, so the graph you want is a SIN or COS wave, so you take time.Time, use it as a ramp, multiply time.Time by a multiplier number to get the speed you want on the sine oscillations, and then multpiply the sine itself by an envelope, in your case it is abit like an exponentially dampening/waning envelope... you can make the waning envelope with some cheap exponential functions from the net, for example one way of making an curved decrease like that, is by taking a ramp (using a version of time.Time that resets to zero every time you want the envelope to retrigger) and doing a sqrt or a cube root or a square or a cube, like this :
[link text][1]
In other words, take time.time, sine or cos it, multiply the result by an envelope equation also based on a function of time.time.
if you want different speeds and amplitudes and periods for x and y axes of the crate, do 2 versions of time dot time, with different amounts added and multiplied to them, and apply each to Sin and then to x and y.
if you decide that sin and cos arent exactly right, you can pass cos through asin or sin through acos to have a triangle oscillation, or you can do a modulo of time.time and then make an absolute of that modulo which will also give you a triangle wave and is less processor hungry than sin. you can also multiply that triangle wave by itself to make it rounder. :)
[1]: http://www.google.co.uk/search?hl=en&q=x%20%2F%20x&aq=f&aqi=&aql=&gs_sm=e&gs_upl=2049l6940l0l7429l14l8l1l0l0l1l1189l5194l3-1.6-3.2l7&bav=on.2,or.r_gc.r_pw.&biw=1280&bih=709&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=DY50UP2UM4Gu0QWRmoGYBA#um=1&hl=en&safe=off&tbm=isch&sa=1&q=x+sqrt&oq=x+sqrt&gs_l=img.3..0i24l5j0i5i24l3j0i5i10i24j0i5i24.7475.9814.2.9989.6.6.0.0.0.0.157.788.0j6.6.0...0.0...1c.1.8WGMsVHiQoQ&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=944caee387241e08&biw=1280&bih=687Tue, 09 Oct 2012 20:55:23 GMTMountDoomTeamComment by maxjt
http://answers.unity.com/comments/330178/view.html
Tue, 09 Oct 2012 20:20:42 GMTmaxjtComment by Karsnen_2
http://answers.unity.com/comments/328006/view.html
Fri, 05 Oct 2012 14:59:24 GMTKarsnen_2Comment by Karsnen_2
http://answers.unity.com/comments/327543/view.html
Thu, 04 Oct 2012 18:18:46 GMTKarsnen_2Comment by Fattie
http://answers.unity.com/comments/327531/view.html
Thu, 04 Oct 2012 18:04:04 GMTFattie