As picture depicted my camera moving on path i want to lookAt bath different object smoothly. Currently have tried
trasnform.LooAt(activePath.gameObject.transform);
but it producing jerky result. object suddenly lookAt to next object how to avoid it. I searched and found this sloution but it also not working
var targetRotation = Quaternion.LookRotation(activePath.gameObject.transform.position - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime);