Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Create 2-point angled path with expression

  • Create 2-point angled path with expression

    Posted by Thomas Faulkner on January 17, 2019 at 1:20 pm

    Hi,

    I’m trying to use the createPath expression to create a two-point path that slants forward (like a forward slash “/”) 20 degrees exactly. I then would use the Pucker and Bloat attribute to increase and decrease the path accordingly.

    My current expression is:

    x = Math.cos(degreesToRadians(290));
    y = Math.sin(degreesToRadians(290));
    createPath(points = [[-0,0],[x,y]], inTangents = [], outTangents = [], is_closed = false)

    It looks to work but when comparing it to a yellow rectangle shape layer transform rotated 20 degrees in follows a ever so slightly different path. See image.

    Any thoughts? Thanks a lot.

    x = Math.cos(degreesToRadians(290));
    y = Math.sin(degreesToRadians(290));
    createPath(points = [[-0,0],[x,y]], inTangents = [], outTangents = [], is_closed = false)

    Kalleheikki Kannisto replied 7 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    January 17, 2019 at 6:24 pm

    Is that actually the code you are using? It would create a path that is one pixel long.

    Kalleheikki Kannisto
    Senior Graphic Designer

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