using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Lookat : MonoBehaviour {
Quaternion target=Quaternion.identity;
void Update () {
target= Quaternion.LookRotation(Camera.main.transform.position-transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, target, 5*Time.deltaTime);
}
}