Point On Path

Position a layer at the end of a trim path - perfect for animating elements along a line.

Expression Code

// Point on Path - Follow Trim End
// Apply to Position property
// Requires a shape layer with a path
pathLayer = thisComp.layer("Shape Layer 1");
pathProp = pathLayer.content("Shape 1").content("Path 1").path;
trimEnd = pathLayer.content("Shape 1").content("Trim Paths 1").end / 100; // change"end" to "start" to match the trim you are animating

pt = pathProp.pointOnPath(trimEnd);
pathLayer.toComp(pt);
Create a shape layer with a path and add Trim Paths. Apply this expression to the Position of the layer you want to follow. Update the layer name and path references to match your shape structure. The layer will stick to wherever the trim currently ends. 1. Create a shape layer with a path and add Trim Paths 2. Select the Position property of the layer you want to follow 3. Alt/Option-click the stopwatch and paste this expression 4. Update "Shape Layer 1" to match your shape layer's name 5. Animate Trim Paths — the layer follows automatically