working on quest and interaction system

This commit is contained in:
2026-10-01 15:14:37 +01:00
parent 163939dab8
commit e8af8950e1
1198 changed files with 2503496 additions and 93 deletions

View File

@@ -0,0 +1,24 @@
using UnityEngine;
/// <summary>
/// Place this on your WorldSpace Canvas to make it always face the player's camera!
/// </summary>
public class Billboard : MonoBehaviour
{
private Camera _mainCamera;
private void Start()
{
_mainCamera = Camera.main;
}
private void LateUpdate()
{
if (_mainCamera != null)
{
// Makes the Canvas look exactly at the camera, then flips it 180 degrees
// so the text isn't backwards!
transform.LookAt(transform.position + _mainCamera.transform.forward);
}
}
}