using UnityEngine;
using System.Collections;

public class DoorOpenerScript : MonoBehaviour {
	
	
	private Vector3 targetRot;
	
	
	public void Open(){
		targetRot.y += 90;
	}
	
	
	
	// Use this for initialization
	void Start () {
		targetRot = transform.eulerAngles;
	}
	
	// Update is called once per frame
	void Update () {
		
		Quaternion lastRot = transform.rotation;
		transform.eulerAngles = targetRot;
		transform.rotation = Quaternion.Slerp(lastRot,transform.rotation, 10 * Time.deltaTime);
	}
}
