Copy link to clipboard
Copied
Hi,
I cant write expression. But I try to. I dnt know how can I write this, because what I wrote is not giving me my expected result.
I want the circle to stay beside the clock. and I linked the circle's Y position movement with the rotation of the clock hand. but the X axis of the circle is in weird position. how should I write the expression to keep the circle's X positon fixed or whereever I want it or just beside the clock but only Y should be take its value from the rotation of the clock hand.
Please guide me.
If you want the sun to be next to the clock, adjust the X position of the sun.
You can also adjust the amplitude.
Copy link to clipboard
Copied
Your dimensions are separated, so you should return only a single value and not an array.
just return temp value
Copy link to clipboard
Copied
I am very slow at picking clue, face palm, I dnt understand wht u said. what should I write?
temp = Math.sin(thisComp.layer("rotating hand").transform.rotation / 5) * 100;
[temp [value]];
this??
Copy link to clipboard
Copied
just return:
Math.sin(thisComp.layer("rotating hand").transform.rotation / 5) * 100;
Copy link to clipboard
Copied
It doesnot work!!! I attached kindly check!! the circle goes some weird position if I write this!
Copy link to clipboard
Copied
Try this:
Math.sin(degreesToRadians(thisComp.layer("rotating hand").transform.rotation - 90)) * 100
Copy link to clipboard
Copied
Yours last expression makes the circle comes down a lil bit. In the meantime I googled and found another tutorial, and from there I picked the essence and this brings down the circle a lot--
x = thisComp.width/2;
y = Math.sin(thisComp.layer("hand").transform.rotation /10) * 400 + thisComp.height/2 + 50;
Copy link to clipboard
Copied
but the x position of the circle is still fixed. cant move it freely.I wonder why its fixed.
Copy link to clipboard
Copied
The calculation depends on the animation you want to create with the expression I gave you.
When the "rotation hand" layer's angle is 0°, the "sun" layer is at the top, and when the angle is 180°, the "sun" layer is at the bottom.
Copy link to clipboard
Copied
Yes, the rythm is very cute. The rythm is like a Monk is floating. I like it. but Its still staying at the edge, It dsnt come down and stay beside the clock!!! 😮 why!! I want the cute ocilliation from your expression but also the sun/circle needs to be beside the clock.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 You are sooo erudite. THANK YOU SOOOO MUCH. 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 I am speechless. Thank you.