ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

sourceRectAtTime Proximity Detection

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Scott McGee
sourceRectAtTime Proximity Detection
on Oct 2, 2017 at 4:01:13 pm

If I precomp layers, this works fine.

R = thisLayer;
L = thisComp.layer(index+1);
delta = (R.width + L.width)/2;
if (length(R.position, L.position) <= delta)
0 else 100;


But text and shape layers that aren't precomped, when I check width, are the width of the comp. The problem is that it doesn't work with the above expression.

I've tried using sourceRectAtTime, but it doesn't appear to be working, but at least, it doesn't see the width as the width of the comp.

R = thisLayer;
L = thisComp.layer(index+1);
delta = (R.width + L.sourceRectAtTime().width)/2;
if (length(R.position, L.position) <= delta)
0 else 100;


Any suggestions.


Return to posts index

Scott McGee
Re: sourceRectAtTime Proximity Detection
on Oct 3, 2017 at 8:29:38 am

Solved my problem.. It was working fine, but it was the anchorPoint that was causing my problem.


Return to posts index

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