-
line ends to follow object
I did a quick search and found that you can’t do an expression to control path point. That was my first thought. So I wanted to ask you guys if you think if this could have been done more efficiently, faster, whatever.
I have 3 objects. A circle, a triangle, and a line connecting them.
I have both objects linked to the circle so I can rotate it as needed.
On the circle I have a slider named “Line Length”
I didn’t want to mess with the scale so much, so first I moved the triangle to 100, then scaled the line to the correction position manually.
I added in a slider “ScaleMult” to add some slight tweaks if I needed them, but once I got set to starting from 100 it was much easier to do the simple math.
These objects are all illustrator, but the line could have been drawn in AE also. There’s nothing special about it really.
All this really is is a stylized arrow to match some other presentations of a similar project done a while ago by someone else (print only). So I thought I’d ad some familiarity by reusing it, but adding some subtle animations like it growing out of wherever, but it’s going to be a bunch of different lengths so I thought I’d make a script to control the line, and a slider to control the length.
So now all I have to do is move the circle around, choose the rotation of the line, and animate the length.
Could this have been done in a better way?
line code:
- scale:
scaleMult = effect("ScaleMult")("Slider") ;
lineLength = thisComp.layer("circle").effect("Line Length")("Slider");
x = transform.scale[0];
y = transform.scale[1] *( scaleMult / 100) * lineLength;
[x,y];triangle code:
-position:
lineLength = thisComp.layer("circle").effect("Line Length")("Slider") ;
x = (transform.position[0]);
y = ( lineLength*-1);
[x,y];