using UnityEngine;
using System.Collections;

public class BashFishRotation : MonoBehaviour {

	Vector3 direction;
	Vector3 MousePosition;
	GameObject player;
	// Use this for initialization
	void Start () {
		player = GameObject.Find ("Player");
		Vector3 MousePosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);
		direction = player.transform.position - gameObject.transform.position;
		direction.Normalize ();
		Quaternion FishDirection = Quaternion.Euler (0, 0, Mathf.Atan2 (direction.y, direction.x) * Mathf.Rad2Deg + 90f);
		gameObject.transform.rotation = FishDirection;
	}
	
	// Update is called once per frame
	void Update () {
		
	}


}
