This expression links the position (and optionally rotation) of a layer to an arbitrary point on a path or also to its Bezier handles. Works even if the path is nested into groups with non-default transforms!
To orient the layer along the path, simply apply the expression to both position and rotation of the layer. You can still keyframe the rotation on top of the rotation generated by the expression.
Animate Along Path
To animate any layer along a path in After Effects, you need to
- make sure mode is set to percentage
- link the Attach Point parameter to a slider (by clicking on the chain link icon right before it)
- Keyframe the linked slider from 0 to 100 to move from the beginning to the end of the path.