FaceCamera.cs 353 B

1234567891011121314
  1. // Useful for Text Meshes that should face the camera.
  2. using UnityEngine;
  3. namespace Mirror.Examples.Tanks
  4. {
  5. public class FaceCamera : MonoBehaviour
  6. {
  7. // LateUpdate so that all camera updates are finished.
  8. void LateUpdate()
  9. {
  10. transform.forward = Camera.main.transform.forward;
  11. }
  12. }
  13. }