Skip navigation

Tag Archives: circle

This makes a layer move in an ellipse around it's position. 
Putting zero for either value creates a simple Sine oscillation. 
(left/right or up/down)
-----paste below code into Position expression-----
//--OSCILLATE LAYER IN AN ELLIPSE--//

//USER ADJUSTED:
radiusDistX = 30;  //set to zero for up/down oscillation
radiusDistY = 100;  //set to zero for sideways oscillation
period = 1; 
// DON'T ADJUST
value + [Math.sin(time*period)*radiusDistX,
-Math.cos(time*period)*radiusDistY]

-----------------end code-------------------------