How to make basic weapon recoil system

Hello.

I would like to make a basic recoil system for my game, but I don’t know where to start and how to achieve it.
What I want to happen is you attack with your weapon and the camera quickly moves up by a set value and then will recover back. If you attack while the camera is recovering, the recovery would be interrupted, and the cycle would repeat.

How would I achieve this? Any help would be appreciated.
Thanks!

1 Like

If you want to make one from scratch here’s a few helpful sources:


But if you’d like something pre-made I suggest EZ Camera Shake by @sleitnick, it’s pretty powerful as it’s pretty easy to understand and allows you to create your own presets.

For basic just add a increament to the cameras X rotation by 0.1 or 1 but if you want to get advanced you can use hooke’s law or sine interpolation or just google a lot till you see a good looking code that you can ctrl+c,v thats what I did.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.