Quantcast
Channel: Answers by "IvovdMarel"
Viewing all articles
Browse latest Browse all 145

Answer by IvovdMarel

$
0
0
Although I'm never opposed to using math, the AnimationCurve in Unity might be the better/easier/more customizable solution here. Untested code: public AnimationCurve curve; public Vector3 end; Vector3 start; float time; void Start () { start = transform.position; } void Update () { time += Time.deltaTime; Vector3 pos = Vector3.Lerp(start, end, time); pos.y += curve.Evaluate(time); transform.position = pos; }

Viewing all articles
Browse latest Browse all 145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>