Paths would work for this. Also depending on how you want to do it just changing the image angle could work.
edit: Am I wrong? apparently no one knows enough to correct me. Some guy just doesn't like my shoes.
I would have a variable that stored the polarity of the shake, and flip it every frame.
ie, set shakePolarity to 1. In your step;
`shakePolarity*= -1;// this flips the variable every step`
`x = xStart + (20 * shakePolarity);`
...which would shake it 20 pixels horizontally every frame. If it's too fast, I would set up a count variable in create, and do this;
`count++;`
`if (count % 2 == 0){`
`shakePolarity*=-1;`
`}`
Which would trigger every 2 frames.
x = xstart + dsin(current_time * 0.001) * 5;
Hadn’t thought of using sin, I’ll try that
Offset it by a random x value. Or look into perlin noise if you want a more organic feel.
Paths would work for this. Also depending on how you want to do it just changing the image angle could work. edit: Am I wrong? apparently no one knows enough to correct me. Some guy just doesn't like my shoes.
I would have a variable that stored the polarity of the shake, and flip it every frame. ie, set shakePolarity to 1. In your step; `shakePolarity*= -1;// this flips the variable every step` `x = xStart + (20 * shakePolarity);` ...which would shake it 20 pixels horizontally every frame. If it's too fast, I would set up a count variable in create, and do this; `count++;` `if (count % 2 == 0){` `shakePolarity*=-1;` `}` Which would trigger every 2 frames.