ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: ping pong

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: ping pong
on Mar 21, 2011 at 4:19:38 pm

Like this, I think:

sp = 500;

totalDist = time *sp;
numCompleteTrips = Math.floor(totalDist/thisComp.width);
thisTrip = totalDist%thisComp.width;
goingLeft = numCompleteTrips%2;
[goingLeft ? thisComp.width - thisTrip : thisTrip, value[1]]g



Dan



Posts IndexRead Thread 


Current Message Thread:
  • ping pong by Marten Kopp on Mar 21, 2011 at 11:09:53 am
    • Re: ping pong by Dan Ebberts on Mar 21, 2011 at 4:19:38 pm





© 2020 CreativeCOW.net All Rights Reserved
[TOP]