Hi there so I have a project where I want some spears to be floating as if in space or bouncing in water like a buoy. I've gotten a bit close to this by adding a wiggle expression to the y axis:
x = transform.position;
y = transform.position;
w = wiggle(2, 150);
But it comes out rough and jagged. I want the movement to be fluid. So is there something I can do or add to the expression to make the movements more fluid. Possibly easing the wiggle or it having velocity.
Dang, i am trying to understand expressions. My weakest link. Wiggle is not going to give you a fluid bounce. You could convert wiggle to keyframes and try to smoothen it out. But really i would just animate 2 keyframes of it bouncing then duplicate the keyframes.
Re: Give Layer Buoyancy by Matthew Woods on Aug 8, 2014 at 2:10:26 pm
That noise expression that Michael mentioned looks cool. I'll have to explore that more.
I was going to suggest, you could just set two keyframes for your top and bottom y position, set them to ease in and out, then apply the expression loopOut("pingpong") to the layer. You can then adjust the period of the wave by changing the timing of the keyframes, and the amplitude by the spacial distance between the two.
That said, the nice thing about Michaels noise expression, is that if you have a number of floating objects, it will look like they are effected by a common turbulent force rather than animated independently.