How to Make the camera not roll attached to a rolling object?

hello there. i want to Make a camera follow this rolling robot, without it following the same rotation path(The camera Rotating with it). i have thought about it and cannot think of a way, so it would be great to have an answer. thanks

You could create a script that keeps a constant distance from the object regardless of orientation such that:

using UnityEngine;
using System.Collections;

public class SteadyFollow : MonoBehaviour
{
    public Transform target;
    private Vector3 offset;

    private IEnumerator Start ( )
    {        
        yield return StartCoroutine( WaitUntilHasTarget( ) );

        GetOffset( );

        yield break;
    }

    private void Update ( )
    {
        MaintainOffset( );
    }

    private IEnumerator WaitUntilHasTarget ( )
    {
        while ( !target )
        {
            yield return null;
        }
    }

    private void MaintainOffset ( )
    {
        if ( target )
        {
            transform.position = target.position + offset;
        }
    }

    private void GetOffset ( )
    {
        offset = target.transform.position - transform.position;
    }
}

Then you could create an empty game object with this script on, and set target to the object you want it to follow. It will maintain its offset every update. So typically you could parent your camera into this new empty game object and it won't roll around with the ball, only follow it.