Physics based camera shake for a vehicle

Hi All,

I am playing around with the desert racing map and I have put the camera inside the buggy. What I would like to have happen now is I want the camera to move naturally with the vehicle. Like when making a hard right turn the player would lean left and when you hit a bump your head bobs a bit and when you hit the brakes you rock forward a bit.

I feel like a swing arm is what I need to use but I have no clue how to get it to do what I want. Any thoughts on how to do this?

This actually turned out to be not that bad to do. I just didn’t understand how camera shake worked. I just put some formulas around player velocity and orientation and reduced it to a number between -1 and 1 using orientation as the indicator for negative and positive and the velocity as the amplitude and put that number into the shake.