Files
BABA_YAGA/Assets/Scripts/Trap/WorldSpacePing.cs
2026-07-02 08:59:23 +07:00

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