public virtual void BeginInteraction(NVRInteractable interactable) { if (interactable.gameObject.GetComponent <Spawner> ()) { GameObject g = Instantiate(interactable.gameObject.GetComponent <Spawner> ().ingredientPrefab, transform.position, transform.rotation); CurrentlyInteracting = g.GetComponent <NVRInteractableItem> (); CurrentlyInteracting.BeginInteraction(this); } if (interactable.CanAttach == true) { if (interactable.AttachedHand != null) { if (interactable.AllowTwoHanded == false) { interactable.AttachedHand.EndInteraction(null); } } CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); if (OnBeginInteraction != null) { OnBeginInteraction.Invoke(interactable); } } }
private void BeginInteraction(NVRInteractable interactable) { if (interactable.CanAttach == true) { if (interactable.AttachedHand != null) { interactable.AttachedHand.EndInteraction(null); } CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); } }
public virtual void BeginInteraction(NVRInteractable interactable) { if (interactable.CanAttach == true) { if (interactable.AttachedHand != null)//xw:AttachHand change? { interactable.AttachedHand.EndInteraction(null); } CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); } }
public virtual void BeginInteraction(NVRInteractable interactable) { if (interactable.CanAttach == true) { if (interactable.AttachedHand != null) { interactable.AttachedHand.EndInteraction(null); } CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); // TODO: A more general event may be better ScenarioLogManager.Instance.LogEvent(this.gameObject, "OnGrasp", CurrentlyInteracting.gameObject.name); } }
public virtual void BeginInteraction(NVRInteractable interactable) { if (interactable.CanAttach == true) { if (interactable.AttachedHand != null) { interactable.AttachedHand.EndInteraction(null); } CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); if (OnBeginInteraction != null) { OnBeginInteraction.Invoke(interactable); } } }
public virtual void BeginInteraction(NVRInteractable interactable) { if (interactable.CanAttach == true) { // Implemented hand controller should subscribe to this event and implement appropriate functionality OnBeginInteractionCustomHands.Invoke(interactable); CurrentlyInteracting = interactable; CurrentlyInteracting.BeginInteraction(this); if (PhysicalController) { PhysicalController.On(); // enable animation with Phyiscal Hand component during interaction } if (OnBeginInteraction != null) { OnBeginInteraction.Invoke(interactable); } } }