Skip to content

Instantly share code, notes, and snippets.

@Voyz
Created January 4, 2021 07:57
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Voyz/170d447bde1cc3f99617c0b60bdbf2ae to your computer and use it in GitHub Desktop.
Save Voyz/170d447bde1cc3f99617c0b60bdbf2ae to your computer and use it in GitHub Desktop.
After Effects path between nulls
offset = [thisComp.width, thisComp.height]/2
p1 = thisComp.layer("P1").toComp([0,0]).slice(0,2) - offset
p2 = thisComp.layer("P2").toComp([0,0]).slice(0,2) - offset
t1 = thisComp.layer("T1").toComp([0,0]).slice(0,2) - offset - p1
t2 = thisComp.layer("T2").toComp([0,0]).slice(0,2) - offset - p2
ps = [p1, p2]
in_tangents = [[0,0], t2]
out_tangents = [t1, [0,0]]
createPath(ps, in_tangents, out_tangents, is_closed=false)
@stiegosaurus
Copy link

stiegosaurus commented Sep 7, 2023

Thank you. I used this to create realistic moving phone cords in an animated illustration. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment