You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE/Assets/Mirror/Examples/Tanks/Scripts/FaceCamera.cs

15 lines
339 B

// 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;
}
}
}