using UnityEngine; namespace SicknessReduction.Visual { public class VirtualNose : MonoBehaviour { public GameObject prefabToSpawn; private Camera cam; private bool camAvailable; private GameObject nose; private void Start() { cam = Camera.main; if (cam == null) { Debug.LogWarning("No main camera found. Cannot place virtual nose!"); return; } else { camAvailable = true; } nose = Instantiate(prefabToSpawn, cam.transform); nose.transform.localPosition = Vector3.forward * cam.nearClipPlane; } private void Update() { //if (!camAvailable) return; //var camTransform = cam.transform; //transform.position = camTransform.position + camTransform.forward * cam.nearClipPlane * 1.03f; } } }