using UnityEngine;
using System.Collections;

public class Faceplayer : MonoBehaviour {
	public Vector3 newdir3;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		Vector3 targetdir3 = GameObject.Find ("Camera").GetComponent<Transform> ().position - transform.position;

		 newdir3 = Vector3.RotateTowards (transform.forward, targetdir3, 5, 0.0f);
		newdir3.y = 0;
		newdir3.z = newdir3.z * -1;
		newdir3.x = newdir3.x * -1;
		transform.rotation = Quaternion.LookRotation (newdir3);
	}
}
