Hello. I am slightly new to using Unreal Engine 5, and I was wondering how I would make a first person camera sway left and right using the mouse? Basically if I were to move the mouse (Camera) to the left quickly, the camera would sway to the left, and if I moved the mouse (Camera) to the right quickly, the camera would sway to the right.
Edit: I reached the maximum amount of replies so I would like to thank you Everynone for the help! Everything works now.
have input set target rotator yaw using Combine Rotators
have Tick arrive at the desired relative camera rotation using rInterpTo
That’d achieve the described effect but may be insufficient (or straight up a wrong direction to take) - knowing what else needs to be considered could be critical here.
I have tried multiple solutions and I have not yet managed to make the camera tilt when turning. I am also using a SpringArm. I have tried without one and yet no result.
What I suggested above was done using the standard 1st person template. Perhaps I misunderstood the intent; here’s what the suggested script produces:
A single swing of the mouse in horizontal axis rotates the camera quickly at first and then comes to a stop. If in doubt, do post the setup and camera / springarm (if you’re using it - could also work for a lazy lag) settings.
If this is not the effect you’re after, consider describing it in more detail.
I will send the setup later, but basically what I meant by camera sway was that the camera would slightly rotate (Roll) to the left or right when the camera moves quickly.
Something like this is the right step forward. The only thing I believe I need is for the rotation to spring back to normal, and for the roll to be more dynamic, such as the speed I turn at. Example: turning quickly which would roll (tilt) the camera strongly and slightly more, and then spring back to normal, but slowly turning would not roll (tilt) the camera