Hello i’m trying to make camera that follows player from behind cuz now is following but rotation is random can anyone help me with this?
using UnityEngine;
using System.Collections;
public class camLook : MonoBehaviour {
public Transform target;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Vector3 pos = target.position;
transform.LookAt(target);
transform.position = new Vector3(pos.x +10.0f,pos.y+10.0f,pos.z +10.0f);
}
}