I am facing issue when camera is following to my target and target rotates to 90 degree or -90 degree than camera is not rotating.i want smooth rotation according to target when target is change the direction of movement.please help me if you can..thanks in advance.
Make your Camera a child of your Player game object by dragging it onto the Player in the Hierarchy window. The camera will then keep its relative position to the player. When the player object rotates, the camera will rotate with it.
Possible problem: When the rotation of the player is not smooth, the rotation of the camera won't be smooth either. When this is a problem in your case, you need to solve it differently. Keep the Camera as an independent game object, but add a script to the Camera with an Update method which checks the transform of the player and changes the transform of the camera accordingly. How to do this in detail depends on your defintition of "smooth rotation" and "smooth following".