Hello! i have finally figured out camera shake! i have been slacking off (because i dont do much anymore) but i remembered about attempting shakes, so i revisited an old idea i had and IT WORKED!
Allow me to explain. you would need two parts, a randomly shaking target & a camera to smoothly follow. the (invisible) target would randomly shake a round and i used some smoothing code to make the vcam (or something else) follow to target.
this.y += ( target .y - this.y) * 0.1;
this.x += ( target .x - this.x) * 0.1;
this.rotation = (target.rotation - this.rotation) * 0.01;
Here is a visual demonstration of how it works
[i keep screwing up the links so no test video, sorry]
Unfortunantally, it has a flaw. since its random motion, then you cant control it, so it can sometimes drift off and ruin the exported video (so set the shaking numbers pretty low so it doesnt drift off)
thank you! :D