Quantcast
Channel: Answers by "ozturkcompany"
Viewing all articles
Browse latest Browse all 24

Answer by ozturkcompany

$
0
0
Hello, Try this; #pragma strict private var i : float = 0; private var j : float = 0; function Update () { j += 0.01;//Makes "i" value decrease and increase 0.01 each frame, you can change it to any number you want i = Mathf.PingPong(j, 2) - 1; print(i); } Mathf.PingPong(t, length); The "t" value must not be constant, that's why your variable keeps in some value.

Viewing all articles
Browse latest Browse all 24

Trending Articles



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