UPF/Assets/Mirror/Examples/Tanks/Scripts/FaceCamera.cs
2023-02-24 22:14:55 +05:30

15 lines
339 B
C#
Executable File

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