using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.VR.Runtime
{
///
/// The player component contains references to the main camera, eye positions and hand positions of the VR player.
///
public class Player : MonoBehaviour
{
///
/// The active player instance.
///
public static Player Instance { get; private set; }
private void Awake()
{
Instance = this;
}
[BoxGroup("Internal")] public new Camera camera;
[BoxGroup("Internal")] public Transform sphereFollow;
[BoxGroup("Internal")] [SerializeField] private Transform leftEye, rightEye;
[BoxGroup("Internal")] [SerializeField] private Collider leftHand, rightHand;
public Transform GetEye(Camera.StereoscopicEye eye) =>
eye == Camera.StereoscopicEye.Left ? leftEye : rightEye;
}
}