Merge branch 'main' of https://scoveria.ddns.net/scove/BABA_YAGA
This commit is contained in:
14
Assets/Scripts/Baba_yaga/Trap/WorldSpacePing.cs
Normal file
14
Assets/Scripts/Baba_yaga/Trap/WorldSpacePing.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user