using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WindGUI : MonoBehaviour {

	// Use this for initialization
	public RectTransform Needle;
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		Vector3 locRot = Needle.localRotation.eulerAngles;
		Quaternion lookDir = Quaternion.LookRotation(WindManager.instance.Direction);
		locRot.z = lookDir.eulerAngles.y+PlayerShipController.instance.transform.rotation.eulerAngles.y;
		Needle.localRotation = Quaternion.Lerp(Needle.localRotation,Quaternion.Euler(locRot),Time.deltaTime);
	}
}
