Real camera shake (I DID IT LETS GOO!)

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
Screen recording 2021-11-05 5.45.14 PM

[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

4 Likes

File links don’t work. You have to actually post the file or a YT link.

Also welcome back, from what I hear you were a legend.

Also they are redoing Forum Fighters

1 Like

m.mm—mMOJAD???
PULL THE ALARMS THY LEGEND HAST RETURNED

3 Likes

:O Interesting!
(Maybe) To improve performance/save data

You can directly make the camera shake
e.g:

position0 = random.integer(100, 500);
position1 = random.integer(100, 500);
// random.integer(project.width, project.height) note: must be individual for x and y, or else it will create a static diagonal motion
speedOnShake = 0.1;
// speed when shaking, depends on project fps
this.x -= (this.x - position0) * speedOnShake
this.y -= (this.y - position1) * speedOnShake
// movement
My Project11-6-2021_14-42-51.wick (1.6 KB)

This would also probably fix the flaw you mentioned, because the coordinates is static.

(Haven’t tested)
(testedx2)

:)

4 Likes

i think i get your point on how this works but the problem is that it seems to give more of an earthquake shake. i have tried this approach before and it didnt work too well. the camera needs to move around in a smooth manner where it slows and speeds up every time the camera changes direction (due to the imperfect nature of human hands).
my approach is very terrible because it requires two pieces and can drift off, but if done right, can some-what resemble the shaking of human hands. Though i admire your approach to simplify this set-up (which is a much needed change). Thank you! :)

5 Likes

It’s good to see you are back buddy :D
Now, if it don’t make you too uncomfortable, may i ask, what caused your sudden departure?

good to see people are doing it!