How do I make recoil?

I want to implement a recoil system for when I shoot a gun. Just have the gun go vertical a certain amount is all. Can anyone help with this? Thanks.

couldn’t you accomplish this via animations? theres a way to do it with physics too but the animation seems easier to me.

I am new to GameDev in general, but I did it using “AddControllerPitchInput” and providing it random values within a defined range. I also used Roll and Yaw to make it go to the sides a little as well.

Not sure if this is the “right way” to do it, but it works. Maybe more tuning of the ranges will improve the final result.

Ok I will try this later.