Follow an object with camera


Now I’m throwing an object from my Main Camera.I need to follow that object with the same camera or another camera.Help me with some eg.



Attach something like this script to your thrown object. This would keep your camera 5 units behind and 5 units above the thrown object. If you want something more specific then please ask more specifically.

public Vector3 cameraFollowOffset = new Vector3(0,5,-5);
public Camera followCamera;

void Start()
    if (followCamera == null)
        followCamera = Camera.mainCamera;

void Update()
    followCamera.transform.position = transform.position + cameraFollowOffset;