Activity › Forums › Adobe After Effects Expressions › Keeping a image perpendicular to a beam
-
Keeping a image perpendicular to a beam
Posted by Jamie Nimmo on January 10, 2006 at 2:32 amHi guys,
I was wondering if I had an image attched to the end point on a beam like a hand, I was wondering if you could use expressions to keep the hand in line with the beam. like:
——>
the arrow head being the image, so as the line becomes diagonal, the arrow points diagonal.hope this isn’t confusing
cheers,
-Jamie Nimmo
Barend Onneweer replied 20 years, 4 months ago 4 Members · 4 Replies -
4 Replies
-
Colin Braley
January 10, 2006 at 3:59 amI’m not quite sure what you are asking. Is the “beam” footage of a wooden beam, like a 2×4, and you need to motion track something into the scene, or is it a graphical element like an arrow, and you need to get an arrowhead to follow it? In the case the you mean “beam” as in footage of a piece of wood, ou can use AE’s 2 point tracker to get rotational values…then use AE’s single point tracker to get positing values…then apply these to the object. — If the “beam” is just an object within AE, like a masked solid or something, why not use parenting and avoid the expressions alltoghether? I hope I understood your question.
~Colin
-
Jamie Nimmo
January 10, 2006 at 4:42 amI mean Beam, as in “Effect->Render->Beam” the 2-point plugin. The beam lines connect two circles positions and I guess I need calculate the vector co-ordinates of the 2 points to get the direction and rotate the graphic i.e hand pointing, or arrow head, to point in the direction of the “beam end”
i.e ——->
if anyone has an idea it would be great
-
Filip Vandueren
January 10, 2006 at 4:58 amAssuming you don’t have any layers parented to anything else, and the beam is applied to a solid that fits to the comp…
give the arrowhead these expressions:
position:
thisComp.layer("beamlayer").effect("Beam")("Ending Point");
rotation:
vec=thisComp.layer("beamlayer").effect("Beam")("Ending Point")-thisComp.layer("beamlayer").effect("Beam")("Starting Point");
rad=Math.atan2(vec[1],vec[0]);
radiansToDegrees(rad)+value;
If the arrow is flipped or 90 degreess of, just scrub the rotation value to + or -90
of course: change “beamlayer” to the name of your beam layer 😎
-
Barend Onneweer
January 10, 2006 at 8:56 pmOr instead of a beam effect, you just take a rectangular solid of the needed width and height, and parent the other still to the solid…
May or may not work for you depending on your specific needs, but thought I’d drop it in…
Bar3nd
Forum COWmunity leader for:
ADOBE AFTER EFFECTS
MAGIC BULLET SUITE
INDIE FILM & DOCUMENTARY
Reply to this Discussion! Login or Sign Up