- Home /
Question by
benjaminver89 · Sep 09, 2015 at 06:46 PM ·
timerinvokerepeating
Perfect sinus
Hi, I'd like to be able to send a sinus to an external device . When launching my function, i start a timer :
time Sinus = Stopwatch.StartNew ();
To avoid Update, i used InvokeRepeating() And i compute:
pos1 = float.Parse( Amplitude.text) * (Mathf.Sin (float.Parse(Frequency.text) *timeSinus.ElapsedMilliseconds / 1000f)));
The probleme is that output is not constant : it works generaly well and sometime some part are completely missing (not go to greatest or lowest value)
Comment