aha
This commit is contained in:
15
Assets/Mirror/Examples/_Common/Scripts/FaceCamera.cs
Normal file
15
Assets/Mirror/Examples/_Common/Scripts/FaceCamera.cs
Normal file
@ -0,0 +1,15 @@
|
||||
// Useful for Text Meshes that should face the camera.
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Examples.Common
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class FaceCamera : MonoBehaviour
|
||||
{
|
||||
// LateUpdate so that all camera updates are finished.
|
||||
void LateUpdate()
|
||||
{
|
||||
transform.forward = Camera.main.transform.forward;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user