Like I have posted several times.
Head Bob needs to die.
The reason behind the motion you are seeing is the animations.
Depending on the quality of the movement animations the head Bob will be more or less severe.
To truly remove the head Bob you need to unparent the camera from the head bone.
What parenting does (though in faster code then BP) is to match the world space location of the head bone to that of the spring arm.
What you can do in code, is lessen the amount that the head bobbles around by setting some limits against which to check before allowing for a Lerped transition to occur.
Why is that? Simple. You can parent to the root, but then if your animations are supposed to offset the camera they will not. So, for a crouching animation for instance, your camera will no longer follow the head.
You have to correct this by code when the movement exceeds a pre-set threshold. And you need to make sure that your animations maintain this threshold as well.
Other hacks to consider, if you are in a game where you never see your face, disable it from view (but enable shadows) and it will never clip your camera.
If you cannot do so (maybe you are making some magic mirror room game?) Then the alternative would be to custom tune each and every single animation with a few curves that are then fed into and manage the camera.
Animation curves can be very powerful for this purpose, and most importantly, since you can copy and paste them from the animation of the bones, they can be dead accurate. Even more so then parenting/socketing I find.
The silly way around to skip all the fine tuning, is to simply force the headbone to stay in place (ignore Z, apply x and y). This can have some odd behaviour, But, because the headbone travels along with the rest of the body, it makes it easier to disable/enable this “follow no follow” behaviour based on how much the Z moves around.
It doesn’t fix the x and y, and often looks silly.
Generally, it works fine in games that dont show the character.
Crysis comes to mind, as one of the games where this happens constantly when peeking through cover. You may want to google for some images of that to understand the extent to which no one cares about what the mesh is doing when in cover… actually, no. Here you go
Do notice, there is no head either, and yet you would have never known while playing.
https://www.eurogamer.net/articles/2…ying-hilarious