ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Create 2-point angled path with expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Thomas Faulkner
Create 2-point angled path with expression
on Jan 17, 2019 at 1:20:03 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)


Return to posts index

Kalleheikki Kannisto
Re: Create 2-point angled path with expression
on Jan 17, 2019 at 6:24:56 pm

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

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

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