I've been pulling hairs trying to create a versatile formula that basically would make something wobble. i have two needs for this formula, first is to make a sprite wobble by manipulating width/height, second to have the sprite move and wobble when reaching its end location.
Here's an image that hopefully shows what i'm trying to create:
Depending on the initial momentum, the sprite should oscillate at the end point until it has stopped.
Here's a cap example:
Both sprites are using the sine behaviour and none of them work correctly.
-the sprite that changes width flips after reaching the mid point (shrinking and getting narrow is fine, but not flipping!)
-the sprite that moves horizontally only wobbles from its initial location instead of moving from point A to point B, this makes me think sine is probably not the answer to this question, i think...
I was hoping that someone with knowledge could poke me in the right direction on how to get this formula done.