How to set the follow distance to a target object when using the “Multipurpose Camera Rig”?

I must be missing something obvious, but is there a simple way to control the standoff distance to the target when using the “Multipurpose Camera Rig” from the Standard Assets “Camera” Package?

The camera rig and target would seem to track together, given:

        // camera position moves towards target position:
        transform.position = Vector3.Lerp(transform.position, m_Target.position, deltaTime*m_MoveSpeed);

I have no initial offset between camera and target, but after a few seconds of runtime the camera arrives at an arbitrary (to me) follow distance.

I did note the min. velocity for following the ‘AutoCam.cs’ script, and other requirements of the exposed script variables.

Simple change the z value of the camera in the rig to whatever you want.
85080-camerafollowdistance.png

So i had the same question and did some digging, eventually i came up with solution in AutoCam.cs add a member variable for distance

[SerializeField] private float m_Distance = 0.0f; // Distance from the target

then at the end add under transform.rotation

transform.rotation = Quaternion.Lerp(transform.rotation, rollRotation, m_TurnSpeed*m_CurrentTurnAmount*deltaTime); transform.position -= transform.rotation * Vector3.forward * m_Distance;

that worked for me

Hi there, it’s actually defined by the pivot:

128792-screen-shot-2018-12-02-at-62558-pm.png

By adjusting the pivot you can define where the “center” of the focus is going to be, then all the script does is apply the camera the same position as the player