Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

jasonmorice
Topic Author
Posts: 6
Joined: Tue Jan 08, 2008 6:10 pm

### How do I set up a slider for 2 layers rotation?

Sorry if this is a simple question but I need to set up a slider to control the opening and closing of a beak (2 layers, top beak and bottom beak).
When the slider is at 100 the mouth is open and when its at 0 its closed. Beaks rotational values are both 0 at closed position and -17 and 23
respectively at open position.

Cheers in advance for any help...

Jase.

Paul Tuersley
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

### Re: How do I set up a slider for 2 layers rotation?

You can use linear() to convert one set of values to another. Apply something like this to each beak layer's rotation:
``slider = thisComp.layer("control layer").effect("beak slider")("Slider");linear(slider, 0, 100, 0, -17);``

jasonmorice
Topic Author
Posts: 6
Joined: Tue Jan 08, 2008 6:10 pm

### Re: How do I set up a slider for 2 layers rotation?

Cheers dude, thats what I was looking for.

### Who is online

Users browsing this forum: No registered users and 2 guests