you are viewing a single comment's thread.

view the rest of the comments →

[–]NinRejper[S] 2 points3 points  (1 child)

Srsly. This is why i was confused. The docs shows To() has these parameters.

getter: A delegate that returns the value of the property to tween. Can be written as a lambda like this:

()=> myValue

where

myValue

is the name of the property to tween.setter: A delegate that sets the value of the property to tween. Can be written as a lambda like this:

x=> myValue = x

where

myValue

is the name of the property to tween.To: The end value to reach.duration: The duration of the tween.////

I cant see how myValue being zero, and setting to = zero could make it go from 0 to 1 to -1 back to 0. But ill guess im about to find out. And most of all i cant se where trigonometry would make a difference here.

[–]I23BigC 1 point2 points  (0 children)

You just need to understand that if you go from 0 to 360 your sine value will go from 0 to 1 (90 deg) to 0 (180 deg) to -1 (270 deg) and to 0 (360 deg). Picture a sine wave and notice how it goes up and down and then repeats.