Cycles not clear

Great lectures , thank you. I am not clear on why we need cycles and Tao .
Sin swings between 0 and 1 for 0 - Pi.
How bad of an idea is it to slow increment radians between 0 and Pi and use speed to control the frequency ?

transform.position = startPos + Mathf.Sin(radians) * moveVector * oscillationSpeed;
radians += Time.deltaTime;
radians = radians % Mathf.PI;

1 Like

Hi Muddlehead,

We do not need cycles and tau. They just make the algorithm more readable/graspable for us humans.

Test your idea. The goal of this lecture is to achieve a smooth oscillation. Whether you use Rick’s code or your own, is completely up to you. If your approch works, it’s a solution by definition. :slight_smile:


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms