# Smooth Camera Offsets

I am attempting to implement a sort of, smooth camera that has angle offsets from the player as they turn, creating a cinematic effect as well as visual feedback for when the player turns.

Here is an example of the desired functionality. (Starts at 1:06) http://youtu.be/uJ6tD-k_RuA?t=1m6s

One idea I was thinking of (if even feasible) is to store a "desired quaternion" of orientation of where the camera wants to look (preferably the player's quaternion of orientation) and a "current quaternion" of the cameras orientation and SLERP to the desired quaternion. Then possibly set a max angle between the two rotations to cap how large the angle offset could be.

What are the ways of doing that?

• For dynamic animation situations like this I like to draw what the interactions look like; for you this is between plane orientation, future orientation, current and relative camera locations and desired camera target. Until you have a clear understanding of how those all work together you're just shooting in the dark and hoping to hit something. So use screen captures from the linked video, draw in the orientations and targets, and use that to decode what they're doing behind the scenes and then create your tech. – Patrick Hughes May 12 '12 at 22:59

BTW: Remember about your frame rate and numerical integration errors - i.e don't compute like: val = dist * 0.1f, but val = dist * log(speed,time)