-
Linking rotation in one comp to position of layer at main comp using valueAtTime
Hi!
I’m trying to make a layer rotate using the position value of another layer on the main comp to make something like a follow through motion as seen here https://www.toolfarm.com/tutorial/after_effects_simulate_cloth_animation_expression/
I’m using Position instead of Anchor Point so the expression I used is
p = comp("Slide3").layer("SW_Robot_1").transform.position;
d = p.valueAtTime(time) - p.valueAtTime(time - .1);(d[0] + d[1]);
The problem is that although I’m using the “time” to tell AE to use the current cursor time it retrieves the same value wherever the cursor is.
PS: When I use a specific time instead of “time” the value retrieved seems to be ok.
EDIT: I realised that actually the expression is working as it should it just happens 15s in the future as this is the offset of the two layers starting point.
I’m trying to offset the expression but haven’t found a solution yet.Can someone help please?
Thanks