Skip to main content
S_ A
Inspiring
December 23, 2022
Question

How to make an arrow follow a wave's end point

  • December 23, 2022
  • 3 replies
  • 681 views

Hello,

 

I want to create a wavy arrow. I created one wave using a script. I wanted to attach the arrowhead at the endpoint of the wave by parenting, but that didn't work. The arrowhead could not sync with the rhythm of the wave, it gets dislodged. I came to know I have to attach the arrowhead using some special math. Sin expression. But no way I could find one on google that can show/teach me how to attach something at the endpoint of a wave using math. sin expression! There are other examples of this expression but those didn't serve my purpose.

 

Can anyone tell me please what particular math sin expression in AE I have to use to get it done? Or at least can guide me on how can I do it?  I have attached the sample. Thank you.

 

 

 

 

This topic has been closed for replies.

3 replies

Mylenium
Legend
December 24, 2022

You applied it to the shape layer's position, not the shape group of your arrowhead. That and of course you may need to adapt the values in the expression. Also start by actually creating your shapes in a predictable manner by zeroing out their values so they appear in the center of the comp. It's key to not fall into these traps and, no offense, a problem with many of your questions. You just randomly draw stuff somewhere in the comp and then wonder why it appears out of whack.

 

Mylenium

S_ A
S_ AAuthor
Inspiring
December 24, 2022

😢 😞 

Mylenium
Legend
December 23, 2022

This goes into the position. For rotation you would modify it due to the different value ranges.

 

Mylenium

S_ A
S_ AAuthor
Inspiring
December 23, 2022

Thank you sooooo much.

S_ A
S_ AAuthor
Inspiring
December 24, 2022

@Mylenium It didnt work. 😥😢 My arrow becomes invisible after applying the expression. (attached).

 

Mylenium
Legend
December 23, 2022

mAmp=50; //amplitude

mMul=2; //phase multiplier

mOff=0.5; //phase offset

 

X=value[0];

Y=Math.sin(time*mMul+mOff)/Math.PI*mAmp;

 

[X,Y]

 

Mylenium

 

S_ A
S_ AAuthor
Inspiring
December 23, 2022

Thank you so much. Can you please tell me a bit more, I have to use this expression on which property of arrowhead. position or rotation? Please? 🙊 where, how do I have to use it?