Activity › Forums › Adobe After Effects Expressions › Jack in the box in Z axis only
-
Jack in the box in Z axis only
Posted by Göran Thorén on October 27, 2008 at 3:57 pmHi, I´m trying to have this springy effect on z axis only but I can´t figure out how to change that expression to work in only one axis.
Please help?
Göran Thorén replied 17 years, 6 months ago 2 Members · 4 Replies -
4 Replies
-
Eric Sanderson
October 27, 2008 at 4:44 pmfreq = 5; amp = 125; decay = 3; z = amp*Math.cos(freq*time*2*Math.PI)/Math.exp(decay*time); value + [0,0,z]
theres a few ways to do it, none any more simple than the other, heres one…and this is assuming your doing a Math.sin or .cos*Math.exp(time) expression for the spring action.
-
Göran Thorén
October 27, 2008 at 4:56 pmHi Eric and thank´s a million for that solution!
Even if I can`t keyframe it, it will work great for my needs!Do you have a clever suggestion for animating it to? (think of holding an object in your hand and looking down and dropping it)
-
Eric Sanderson
October 27, 2008 at 4:58 pmyou shouldnt need a script if you planned on keyframing it.
So if im understanding you right you dont need so much of a “springy” action as you do just bounce or recoil from something dropping and hitting the ground?
-
Göran Thorén
October 27, 2008 at 5:09 pmWhat i mean is if I need to drop a lot of objects that way and have it do that springy motion when it lands.
Another thing. Is there a way to offset your expression so #1, it doesn´t start right away and #2 so the layers doesn´t move in synch?Thank´s again!
Reply to this Discussion! Login or Sign Up