Some fixes made, object picking logic added
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user