Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
This goes into the position. For rotation you would modify it due to the different value ranges.
Mylenium
Copy link to clipboard
Copied
Thank you sooooo much.
Copy link to clipboard
Copied
@Mylenium It didnt work. 😥😢 My arrow becomes invisible after applying the expression. (attached).
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
😢 😞