How to make a simple up and down "head bob" for first person game's camera??

I’m not sure about vehicles, I haven’t played around with them. Line trace might be the way to go there.