Time.time?

Hi!
i’m actually quite bad at maths and, tbh, i’m having a hard time with this section. I understand the idea behind this script, but certain things puzzle me, specially the rawSinWave thing. Why do we need a growing number (using Time.time) in order to get this right? I really don’t understand how a growing number would output the same movement for every full sine wave.

Thank you very much for this amazing course ^^

1 Like

Hi Timoneda

my maths is also not great but after some help from Sebastian and google I have the answer as I also had a hard time understanding Time being an increasing value.

https://www.mathsisfun.com/sine-cosine-tangent.html

Go to this link and move the value around in the circle and you will see the following:

Sine 180 and 360 = 0
Sine 90 = 1
Sine 270 = -1

So time is increasing and tau is constant at 6.28. We can think of time * tau as the angle that the Sine function needs.

Let’s say that time * tau = 90 then the result is 1

Now let’s say that time * tau = 450 (which it could because time is increasing). Sine(450) = 1 because it is 90 higher than 360 so Sine treats it as 90 just as Sine(630) would give -1

hope that makes sense

2 Likes

I got a general understanding from this reply Stephen, thanks. Don’t think I can reproduce this just yet but at least I have a grasp of what just happened haha.

Privacy & Terms