ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Control 'Y' position of 3D Layer using Slider Control

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shrey Dua
Control 'Y' position of 3D Layer using Slider Control
on Jun 15, 2020 at 9:48:26 pm

Hi guys, this may be a dumb question, but I'm trying to move my 3D layers along the Y-axis by using a slider control to link to Soundkeys. Based off a slider scale of 0-100,

At zero, I need the layer to be at position (900, 500, 0)
At 100, I need the layer to be a position (900, 650, 0)

Is there any way to do this?

Also, is it possible to make the slider have the layer move a specific number of pixels along the Y-axis for every numerical increment on the slider control?
For example, if it could make a layer move 2 px on every point of the slider control?

TLDR; I want to move the Y-position of a 3D layer to move along Point A to Point B using Soundkeys.


Return to posts index

Dan Ebberts
Re: Control 'Y' position of 3D Layer using Slider Control
on Jun 15, 2020 at 10:24:18 pm

I don't think this is exactly what you asked for, but it's probably close:

yMax = 150;
s = thisComp.layer("Controls").effect("Slider Control")("Slider");
yOffset = linear(s,0,100,0,yMax);
value + [0,yOffset,0]

The slider, or whatever you link to will give a y offset range of zero to whatever you set yMax to as the slider goes from zero to 100;.

Dan



Return to posts index

Shrey Dua
Re: Control 'Y' position of 3D Layer using Slider Control
on Jun 16, 2020 at 2:17:57 am

WOW, it worked! Thank you so much, really! ☺


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]