We use the cosine function to animate the Y position of the sphere. The cosine function in Xpressionist assumes the argument to be in degrees. We use time * 90 as an argument for the cosine function because we want the argument to create angular values between 0 and 360 in four seconds - like one full rotation:
sphere.YPosition = cos( time * 90 );
We preview the result:
|