mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-22 23:28:43 -05:00
24 lines
514 B
C#
24 lines
514 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SimpleBillboard : MonoBehaviour
|
|
{
|
|
private void Start()
|
|
{
|
|
StartCoroutine(LookAtCamera());
|
|
|
|
IEnumerator LookAtCamera()
|
|
{
|
|
if (Camera.main == null) yield break;
|
|
Transform targ = Camera.main.transform;
|
|
while (true)
|
|
{
|
|
transform.LookAt(targ);
|
|
yield return null;
|
|
}
|
|
}
|
|
}
|
|
}
|