What is the best way to create a "shaking" effect where the object starts and ends in the same position?

Principle Version:Version 5.8 (5019)
macOS Version: Mojave Version 10.14.2
Sketch Version: Sketch 55

I’ve been stuck on trying to figure out how to create an animation in principle that has the same start and end point with only 2 artboards. Is this possible?

I want to create a left-to-right shaking effect on an object, but when using more than 2 artboards to try and do this, it never comes out smooth. Any advice on how to accomplish this? And in general, how do you create a smooth shaking animation for objects that begin and end in the same place? Do you need more than 2 or is it possible to do with just 2 art boards?

You could set it up like so with 2 artboards:

A —tap–> B
<–auto–

Make b the shaken state. If you want it to move more, you could add additional artboards.

@Daniel So I almost got the animation to work but am having a slight stall when it is transitioning from artboard 2 to 3 even though the timeline is setup to to flow consecutively. Here is how I am setup:

  1. Start state
  2. Expand state (bounce effect)
  3. End state (different than start state)

I am using spring between 1 and 2 and then ease out between 2 and 3. But it’s creating a slight stall between artboards 2 and 3. How can I smooth this out so it doesn’t stall? I have tinkered with every type of animation effect but they all seem to have that stall.

change the spring animation properties so that the spring animation finishes at the same time as the other animations. I’d try making the tension and friction higher.