using UnityEngine; /// /// Place this on your WorldSpace Canvas to make it always face the player's camera! /// public class Billboard : MonoBehaviour { private Camera _mainCamera; private void Start() { _mainCamera = Camera.main; } private void LateUpdate() { if (_mainCamera != null) { // Makes the Canvas look exactly at the camera, then flips it 180 degrees // so the text isn't backwards! transform.LookAt(transform.position + _mainCamera.transform.forward); } } }