You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
473 B
C#
20 lines
473 B
C#
//Shady
|
|
using UnityEngine;
|
|
using Sirenix.OdinInspector;
|
|
|
|
[HideMonoScript]
|
|
public class Billboard : MonoBehaviour
|
|
{
|
|
[Title("BILLBOARD", titleAlignment: TitleAlignments.Centered)]
|
|
[SerializeField] Transform _cam = null;
|
|
|
|
private void LateUpdate()
|
|
{
|
|
if(_cam == null)
|
|
_cam = Camera.main.transform;
|
|
if(_cam == null)
|
|
return;
|
|
transform.LookAt(transform.position + _cam.forward);
|
|
}//LateUpdate() end
|
|
|
|
}//class end |