XaiJu
Workbench
Workbench

patreon


Tutorial 87: Angular Controls

In Tutorial 85: Integrated Textures, we made an interesting shadow out of a displaced layer. I thought it might be useful to change the default controls of Displacement Map from Max Horizontal and Max Vertical Displacement to Angle and Distance sliders. So I built that. And I continued to apply that expression to similar parameters—like position. That allowed me to animate things diagonally as easily as I can move things in X or Y. Because of that, we can put a bunch of things together going in the same direction and animate simple sliders like in our example GIF below.

Horizontal Only:

a = effect("Angle Control")("Angle");

d = effect("Distance")("Slider");

x = Math.cos(degreesToRadians(a));

x*d;


Vertical Only:

a = effect("Angle Control")("Angle");

d = effect("Distance")("Slider");

y = Math.sin(degreesToRadians(a));

y*d;


Both (for position style controls):

a = effect("Angle Control")("Angle");

d = effect("Distance")("Slider");

x = Math.cos(degreesToRadians(a));

y = Math.sin(degreesToRadians(a));

value+[x*d,y*d];


Thanks for your support patrons!

Tutorial 87: Angular Controls

Comments

We only started selling project files after #117. For anything under 117, they're on our website if available. This one is not.

Workbench

How to get the project file

فاطمة المحمادي


More Creators