need help with camera script

hey

i had a question im making me first game and i want to make my camera like the andriod game gyro sphere

can someone please help me with that ?

I can’t provide you with code but I think - judging from a gameplay - the main idea would be to create a script that you put in your camera.
Now in that script make a smooth follow by Lerping from the current position to behind the ball’s position.
As for the rotation, the pivot point shall be the ball itself and adjust the rotation similarly how you adjust the position.

The sample assets that come with Unity have tons of camera follow scripts and examples.

Also there are examples in the tutorial section of the site.

but i know dont want the best way is to find it
:S

hey i have a script for the camera it will follow nicely but i would not turn when the player turns
what do i need to add for that to work?/

using UnityEngine;
using System.Collections;

public class CameraFollow : MonoBehaviour {

    public Transform target;           
    public float smoothing = 5f;       

    Vector3 offset;                    

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

    void FixedUpdate()
    {
       
        Vector3 targetCamPos = target.position + offset;

      
        transform.position = Vector3.Lerp(transform.position, targetCamPos, smoothing * Time.deltaTime);
    }
}