Following on from the previous lecture…
Instead of creating vars for ‘cycles’ and ‘tau’ (which went a little over my head, tbh) I just added in the following statement inside Update():
movementFactor = Mathf.Sin(Time.time)
This worked a treat for me and allowed the platform to oscillate nicely back and forth without any of the headache trying to understand tau, radians, etc.
Can anyone please explain to me why my solution is sub-optimal when compared with Rick’s? (I’m sure it probably is but - since it seems to achieve the same results - I’m not sure why…)
Many thanks!