• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Trying to move 4 objects in sync from the same point. Anchor point error????

Participant ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

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.

maxelcat_0-1681723211862.png

Next I put a trace path null with its anchor point at the start and use trim path. Works fine. 

maxelcat_1-1681723311488.png

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

maxelcat_2-1681723478564.png

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

maxelcat_3-1681723690253.png

maxelcat_4-1681723796969.png

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. 

maxelcat_5-1681723891421.png

maxelcat_6-1681724240313.png

 

TOPICS
Error or problem , How to

Views

349

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

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. 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2023 Apr 17, 2023

Copy link to clipboard

Copied

That was not completely clear from your explanation.

 

Here's the workflow for that:

  1. Create a Shape Layer with a stroked path, press the 'u' key twice to reveal all modified properties, select the Shape Layer/Contents/Shape 1/Path
  2. Go. to the Window Menu and select Create Nulls from Paths.jsx/Trace path
  3. Your comp will now have a null that follows the path, and there will be a Loop check-box, a Progress slider, and a couple of keyframes
  4. Create a new shape layer in the shape of an arrow pointing vertically, select the Anchor Point tool (y), make sure snapping is turned on and set the anchor point to the point of the arrow.
  5. Duplicate the Arrow shape layer, open Rotation, and rotate the layer 90º so it points horizontally
  6. Reveal the Position property of the Trace Path null, and reveal the Position property of both arrow layers by pressing P when they are selected, then start an expression for the horizontal arrow by typing y = and then use the Pickwhip to grab the Y position of the Shape Null only. Complete the expression for the vertical arrow by typing [value[0], y]
  7. Repeat for the vertical arrow but change the expression so that you are looking only at the X axis and value[1]

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[1];
[value[0], y]

// Vertical Arrow Position:
x = thisComp.layer("Trace Shape Layer 1: Path 1 [1.1]").transform.position[0];
[x, value[1]]

RickGerard_0-1681802666255.gif

I have uploaded a sample file for you to look at.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 18, 2023 Apr 18, 2023

Copy link to clipboard

Copied

thank you so much - that is so helpful. Really appreciate it

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 18, 2023 Apr 18, 2023

Copy link to clipboard

Copied

LATEST

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines