Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Converting 2D expressions to 1D

  • Converting 2D expressions to 1D

  • Navarro Parker

    September 23, 2016 at 9:07 pm

    I’m using a couple expressions that were originally made for the 2D XY position parameter. I’ve used Separate Dimensions so now they are 1D. And I’m stumped how to convert the expressions.

    Starting with this:
    // Throw (move at a constant speed without keyframes)
    veloc = -10; //horizontal velocity (pixels per second)
    x = position[0] + (time – inPoint) *veloc;
    y = position[1];
    [x,y]

    my modification for 1D X position isn’t working:
    veloc = -10; //horizontal velocity (pixels per second)
    value + (time – inPoint) * veloc;

  • Xavier Gomez

    September 23, 2016 at 9:20 pm

    What error do you get ?

  • Dan Ebberts

    September 23, 2016 at 9:25 pm

    I think you somehow ended up with an en dash instead of a hyphen in the second line. This works for me:

    veloc = -10; //horizontal velocity (pixels per second)
    value + (time-inPoint)*veloc;

    Dan

  • Navarro Parker

    September 23, 2016 at 10:43 pm

    Of all the dumb things… #@*! Yes, that must have been it. Good eyes! I blame Google Docs.

Viewing 1 - 4 of 4 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy