Esempio n. 1
0
 public virtual void _OnRelease()
 {
     grabbing = false;
     insideView.ClearOwnership();
     insideRigidbody.isKinematic = tmpKinematic;
     if (grabbedGrabbable == null)
     {
         Debug.Log("You have a grab triggered with no grab");
     }
     else
     {
         grabbedGrabbable.ReleaseObject(view.ownerID, right);
     }
     OnRelease();
 }
Esempio n. 2
0
    private void Update()
    {
        if (OVRInput.Get(OVRInput.Button.PrimaryHandTrigger) || OVRInput.Get(OVRInput.Button.SecondaryHandTrigger))
        {
            _realtimeTransform.RequestOwnership();
            _realtimeView.RequestOwnership();
        }

        //while(!(OVRInput.Get(OVRInput.Button.PrimaryHandTrigger) || OVRInput.Get(OVRInput.Button.SecondaryHandTrigger)))
        //{
        //    if (OVRInput.Get(OVRInput.Button.PrimaryHandTrigger) || OVRInput.Get(OVRInput.Button.SecondaryHandTrigger))
        //     {
        //         _realtimeTransform.ClearOwnership();
        //        _realtimeView.ClearOwnership();
        //     }
        //}

        if (OVRInput.Get(OVRInput.Button.One))
        {
            _realtimeTransform.ClearOwnership();
            _realtimeView.ClearOwnership();
        }
    }