mmorpg/Assets/Mirror/Examples/_Common/Scripts/FaceCamera.cs
2024-01-30 19:56:12 +05:30

15 lines
340 B
C#

// Useful for Text Meshes that should face the camera.
using UnityEngine;
namespace Mirror.Examples.Common
{
public class FaceCamera : MonoBehaviour
{
// LateUpdate so that all camera updates are finished.
void LateUpdate()
{
transform.forward = Camera.main.transform.forward;
}
}
}