public override void HoveringUpdate(NVRHand hand, float forTime) { base.HoveringUpdate(hand, forTime); if (IsAttached == false) { if (forTime > PickupAfterSeconds) { hand.BeginInteraction(this); } } }
// Called once one hand lets go. Aka only 1 hand is left holding on public virtual void OnSecondHandReleased(NewtonVR.NVRHand handStillHolding, NewtonVR.NVRInteractableItem nvrIItem) { // End interaction with Enemy handStillHolding.EndInteraction(nvrIItem); // Enable weapon Colliders until ready to be used foreach (Collider c in spawnedWeapon.GetComponentsInChildren <Collider>()) { c.enabled = true; } // Start Interaction with Weapon handStillHolding.BeginInteraction(spawnedWeapon.GetComponent <NewtonVR.NVRInteractable>()); // Destroy Enemy Destroy(gameObject); }