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

[ExecuteInEditMode]
public class Billboard : MonoBehaviour
{
	new Camera camera;

    void Start()
    {
	}

    // Update is called once per frame
    void Update()
    {
		if (camera == null)
		{
			//Debug.Log("Reinit Camera");
			camera = Camera.main;
		}
		else
		{
			transform.rotation = camera.transform.rotation;
			//transform.LookAt(camera.transform.position);
			//transform.rotation = Quaternion.LookRotation(transform.position - camera.transform.position);
		}
	}
}
