15 lines
349 B
C#
15 lines
349 B
C#
using UnityEngine;
|
|
|
|
public class WorldSpacePing : MonoBehaviour
|
|
{
|
|
void LateUpdate()
|
|
{
|
|
// Face the main camera
|
|
if (Camera.main != null)
|
|
{
|
|
transform.LookAt(transform.position + Camera.main.transform.rotation * Vector3.forward,
|
|
Camera.main.transform.rotation * Vector3.up);
|
|
}
|
|
}
|
|
}
|