Copy link to clipboard
Copied
Hello, like the title says, how do u make a shape or object be tangential to the path at every point of the path, regardless of the shape of the path?
If you have a motion path you want to follow, Shift + Parent a null to the motion path, set the Null to Auto Orient to the motion path, then Shift + parent the Circle to the Null and offset the Y position of the circle by the radius of the circle.
If you want to follow a shape layer path or a mask path, select the path in the timeline, open Window/Create Nulls From Paths.jsx and select Trace Path, then Shift + Parent the Circle (with the anchor point in the center) to the Trace null and offse
...Copy link to clipboard
Copied
Layer > Transform > Auto-Orient... (Option + Command + O, macOS)
Copy link to clipboard
Copied
that doesnt seem to work. to be clear, i have made a custom path with the pen tool, then a circle shape on a new shape layer. i set the anchor point of the second shape layer to be in the center of the circle and i copied the path property of the first layer to the position property of the second. this made the circle center coincide with the starting point of the path, where i want to make the circle be tangent to the path.
Copy link to clipboard
Copied
Auto-Orient works based on the Motion Path of the Layer's Position property.
For what you have described, you'll need to keyframe the Rotation of the circle such that it coincides with the motion.
Copy link to clipboard
Copied
can i do that automatically?
Copy link to clipboard
Copied
If you still have access to the path, and it's still representative of the motion path, you could use something like this to adjust the shape's position:
t1 = key(1).time;
t2 = key(numKeys).time;
pct = clamp(time,t1+.001,t2-.001)/(t2 - t1);
path = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;
n = path.normalOnPath(pct);
radius = content("Ellipse 1").content("Ellipse Path 1").size[0]/2;
offset = radius*n;
value - offset
Copy link to clipboard
Copied
so only via expressions.
Copy link to clipboard
Copied
That's probably not the only way, but the path function normalOnPath() will do the heavy lifting part of the vector math involved, so I'd take advantage of that.
Copy link to clipboard
Copied
If you have a motion path you want to follow, Shift + Parent a null to the motion path, set the Null to Auto Orient to the motion path, then Shift + parent the Circle to the Null and offset the Y position of the circle by the radius of the circle.
If you want to follow a shape layer path or a mask path, select the path in the timeline, open Window/Create Nulls From Paths.jsx and select Trace Path, then Shift + Parent the Circle (with the anchor point in the center) to the Trace null and offset the position by the radius of the circle.
Copy link to clipboard
Copied
awesome, works like a charm. thank you so much.
Copy link to clipboard
Copied
Copy the path proprety of the path and paste it in the circle's position property.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now