Skip to content

Instantly share code, notes, and snippets.

@ralphcrisostomo
Created November 15, 2016 16:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralphcrisostomo/0d2d12a5fd07829666e7a68b02b5eaa3 to your computer and use it in GitHub Desktop.
Save ralphcrisostomo/0d2d12a5fd07829666e7a68b02b5eaa3 to your computer and use it in GitHub Desktop.
AE Expression for controlling a rotation
//
// Rotate Controller - By Ralph Crisostomo (16NOV2016)
// AE Expression
//
Radius = effect("Radius")("Slider");
Speed = effect("Speed")("Slider");
Multiplier = effect("Multiplier")("Slider");
X = effect("X")("Slider");
Y = effect("Y")("Slider");
Z = effect("Z")("Slider");
_position = [X,Y,Z];
_speed = time * Speed;
_x = Radius * Math.cos(degreesToRadians(_speed));
_y = _speed/ Multiplier;
_z = Radius * Math.sin(degreesToRadians(_speed));
add(_position, [_x,-_y,_z]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment