Some fixes made, object picking logic added

This commit is contained in:
Timur Nizamov
2025-12-21 00:01:28 +02:00
parent 27d5fdd68c
commit 50dba2cd81
82 changed files with 1464 additions and 1390 deletions

View File

@@ -40,6 +40,7 @@ namespace _PROJECT.NewHandPresence
private List<XRGrabInteractable> _grabInteractables = new List<XRGrabInteractable>();
private XRGrabInteractable _grabInteractable;
public event Action<XRGrabInteractable> OnGrab;
private GameObject _billboard;
@@ -219,6 +220,11 @@ namespace _PROJECT.NewHandPresence
private void OnGripPerformed(SelectEnterEventArgs arg0)
{
var grab = arg0.interactableObject as XRGrabInteractable;
// Notify any listeners
OnGrab?.Invoke(grab);
if (_state != TutorialState.Grip) return;
Debug.Log("Grip performed");
UpdateState(_state.Next());