- Home /
More realistic head bob? (Help)
Hello, I'm working on an FPS-style game and I'm in need of a more realistic head-bobbing script. The ones I have tried so far only move the player-camera up and down when moving. Does anyone have a head bobber that moves it more realistically? Like, not just up and down, but a little left-to-right?
I'm hoping for something somewhat similar to the camera movement in any of these following videos: http://www.youtube.com/watch?v=mbffk7IBBoo
more specifically, something like this, at 0:25 when the player runs. http://www.youtube.com/watch?v=ORXxo5GBnjE
Any help is appreciated, thanks! (I'm a new coder by the way.)
Sorry to bump, but, any help out there? Thanks.
Its probably not a script, but two animations, one for idle and one while running.
Head bobbing is both realistic and not realistic at the same time. It is realistic because in real life our head moves up and down as we walk. However it is not realistic because in real life the brain corrects for that displacement so that we do not feel it. The brain uses feedback from the muscles and other sensors (balance in the ear for example) to make us unconscious of that motion.
Think of a similar thing: blinking. We could implement blinking by rendering a dark red frame every few seconds, but that would annoy the player. In real life, we do not notice that we blink, but we notice when a lightbulb flickers. This is because the brain uses feedback from the eyelids to inhibate the "light just turned off" neurons.
So when speaking of realism, we should wonder whether we are talking about physics, psychology, or a balance between the two. The choice is an artistic one.
Answer by Panik.Studios · Nov 24, 2013 at 12:33 AM
If you want realism you need to think realism.. When you walk your eyes/head don't bounce up and down independent from your body while your body moves forward?
It is animations you;re seeing here not script. And this question can only be asnwered properly if we know more about your end game is it multiplayer etc.
Assuming its not.. What is happening in this video....
The arms gun and camera are movin left and right up and down... In a arch (like a sin wave)
So Make an animation that makes there transform move in an Arch Shape! You will need to add play animation to your walk script.. And you should add the arms the gun and the camera together if you only want one animation!
Im sure you can do it all with scripts as well but that seems to me more work to achieve the same end goal!
Alright thanks I'll see if I can do it that way. I'm new to animation as well, the only part of Unity I'm really experienced with is terrains and some basic coding.
Your answer
![](https://koobas.hobune.stream/wayback/20220613122558im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Head Movement 1 Answer
Realistic Movement 3 Answers
Head bob ? JavaScript 1 Answer
Headbobber script in C#? 3 Answers