Cannot find a good tutorial for camera recoil

I cannot find an up-to-date tutorial for Unity 2019.2 for camera recoil when I shoot. I need help finding one

What’s wrong with the old ones?

Just make an animation - Window > Animation > Animation.

They do not work for me anymore

I do not think it works like that

Have you actually tried? Or simply you don’t know how to use this tool?

Why not? Be specific.

1 Like

You can just make the camera a child of another GameObject, and whenever you want to do the recoil you just kick off a coroutine which does it to the child object. The coroutine might just move the camera slightly back then return to 0,0,0, or it might do a random shake, whatever you are looking for. Point is you put your camera controller script on the parent, and do your camera recoil effect on the child which actually has the camera component attached. This is how I do all my camera shake effects, and I’m sure a recoil effect it would do just fine with.

If you’re afraid of coroutines, you could easily do this kind of thing in Update.

1 Like

Tween engines can handle it too. DoTween specifically has “punch” ones that can bump both position and rotation, and I’m sure other ones have something similar.

You could also just go through an animation curve. There’s a billion ways to do this, really.

1 Like