Quantcast
Channel: Answers by "TobiasP"
Viewing all articles
Browse latest Browse all 72

Answer by TobiasP

$
0
0
Hey again! There are several ways. I usually use MoveTowards. This doesn't have slowing down near the end and you can pretty much compare the positions. if (theObject.transform.position == end) If you want to use lerp, you can use Mathf.Approx to compare the x and y. [Unity Doc][1] [1]: http://docs.unity3d.com/Documentation/ScriptReference/Mathf.Approximately.html

Viewing all articles
Browse latest Browse all 72

Trending Articles



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