Getting TextMeshPro to always face the camera rotation.
For some reason, the text was upside down. Added a flip in code.
using UnityEngine;
public class TextMeshFloater : MonoBehaviour
{
private Camera mainCamera;
void Start()
{
mainCamera = Camera.main;
}
void Update()
{
if (mainCamera != null)
{
// Make the text face the camera
transform.LookAt(mainCamera.transform.position);
// Flip because Text is upside down
transform.Rotate(180, 0, 0);
}
}
}
