HI - I can't seem to get the below to work - any pointers please?
I think it is something to do with anchor points??? I am trying to move 4 objects together by using a null and setting all the anchors in the same place
I have a parabola with its anochor point as shown.
Next I put a trace path null with its anchor point at the start and use trim path. Works fine.
Next I create a shape layer arrow with its anchor in the middle and lined up with the others. I separate the x and y dimensions for the arrow and link the x to the null's progress. Arrow now moves exactly along with the ball - just in the x-direction
Trouble starts when I do the same with a new shape layer to make an arrow in the y direction. I put the anchor in the same place at the first key frame and whip the y position to the null position
this seems to provide the right movement but the arrow (or line atm) has gone up to the top even though I set the anchor points to be in the same place as the x one.
Copy link to clipboard
You are overcomplicating the workflow.
If you start with a shape layer and a path or a regular layer with a mask, and you have not Scaled, Rotated, or moved the layer, all you have to do to get a null to follow the path is copy the path, set a keyframe for Position on the null layer, then paste. I usually set and then cut a keyframe for the path so I am always sure that I have correctly copied the path information before I paste it to a layer's position.
Now that you have the Null following the path, all you have to do is Shift + parent another layer to the Null. This will snap the layer to the same position and follow the orientation of the null if you have set the null to Auto Orient to Motion Path using the Laye/Transform menu. There are very few reasons ever to separate dimensions on Position. They foul up a lot of workflows and only help with a few.
If you then need to adjust the position of your Arrow to match the path, just drag it in the comp panel or use the arrow keys to nudge it into position. It will still follow the motion of the path perfectly. The only reason to ever adjust the anchor point on your arrow would be to put the anchor point at the center of rotation. I usually put the anchor point at the point of an arrowhead.
I hope that makes sense.
thanks for your answer. I tried what you suggested but I don't think it is going to do what I want. I am after an arrow which follows the x coordinate of the parabola, and another which follows the y corrdinate. While working through you reply it occured to me that I have been whipping to the trim path percentage rather than the position - so it was never going to work - so I think it's back to the drawing board.
That was not completely clear from your explanation.
Here's the workflow for that:
You are basically done. All you have to do is position the appropriate arrows where you want them on X and Y and they will now follow the null.
All you have to do to get the line to draw on is to add Trim Paths and synchronize the keyframes.
Here are the expressions for the arrows:
// Horizontal Arrow Position y = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").transform.position; [value, y] // Vertical Arrow Position: x = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").transform.position; [x, value]
I have uploaded a sample file for you to look at.
thank you so much - that is so helpful. Really appreciate it
Actually Rick, I worked through your method before I looked at your file. Worked fine. Then I looked at your file, just to compare and see how you did the arrow shape. I can't tell you how helpful this has been for me - and sorry I wasn't as clear as I could have been. Thank you so much.