Smoothly LookAt different object
<p>As picture depicted my camera moving on path I want to lookAt path's different object smoothly. Currently I have tried</p>

<pre><code>trasnform.LooAt(activePath.gameObject.transform);
</code></pre>

<p>but it producing jerky result. Object suddenly lookAt to next object with jerk! how to avoid it. I searched and found this solution but it also not working</p>

<pre><code>var targetRotation = Quaternion.LookRotation(activePath.gameObject.transform.position - transform.position);
        transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime);
</code></pre>

<p><a href="https://i.stack.imgur.com/t65rA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t65rA.png" alt="enter image description here"></a></p>