protected void GrabbableRelease(OVRGrabbable grabbable, Vector3 linearVelocity, Vector3 angularVelocity)
 {
     grabbable.GrabEnd(linearVelocity, angularVelocity);
     if (m_parentHeldObject)
     {
         grabbable.transform.parent = null;
     }
 }
Esempio n. 2
0
 protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
 {
     m_grabbedObj.GrabEnd(linearVelocity, angularVelocity);
     if (m_parentHeldObject)
     {
         m_grabbedObj.transform.parent = null;
     }
     m_grabbedObj = null;
 }
Esempio n. 3
0
 protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
 {
     m_grabbedObj.GrabEnd(linearVelocity, angularVelocity);
     if (m_parentHeldObject)
     {
         m_grabbedObj.transform.parent = null;
     }
     SetPlayerIgnoreCollision(m_grabbedObj.gameObject, false);
     m_grabbedObj = null;
 }
Esempio n. 4
0
 protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
 {
     m_grabbedObj.GrabEnd(linearVelocity, angularVelocity);
     if (m_parentHeldObject)
     {
         m_grabbedObj.transform.parent = null;
     }
     PickFarObj.instance.Release(this);
     m_grabbedObj = null;
     //lookingGrabbable = null;
 }
Esempio n. 5
0
    protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
    {
        // fudge physics
        const float SENSITIVITY = 2.5f;

        m_grabbedObj.GrabEnd(linearVelocity * SENSITIVITY, angularVelocity * SENSITIVITY);
        m_grabbedObj.GetComponent <BasketballBehavior> ().setWasThrown(true);
        GameObject.Find("Floor").GetComponent <MainBehavior> ().respawnBasketball(m_grabbedObj.gameObject);

        if (m_parentHeldObject)
        {
            m_grabbedObj.transform.parent = null;
        }
        m_grabbedObj = null;
    }
Esempio n. 6
0
 protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
 {
     m_grabbedObj.GrabEnd(linearVelocity, angularVelocity);
     if (m_parentHeldObject)
     {
         m_grabbedObj.transform.parent = null;
     }
     if (m_grabbedObj.tag == Constants.TAG_BOW)
     {
         var boxCollider = m_grabbedObj.GetComponent <BoxCollider>();
         boxCollider.isTrigger = false;
         var bowController = m_grabbedObj.GetComponent <BowController>();
         bowController.ComeBackPositionOrigin();
     }
     m_grabbedObj = null;
 }
Esempio n. 7
0
    protected void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
    {
        m_grabbedObj.GrabEnd(linearVelocity, angularVelocity);
        if (m_parentHeldObject)
        {
            m_grabbedObj.transform.parent = null;
        }
        SetPlayerIgnoreCollision(m_grabbedObj.gameObject, false);

        Rigidbody rigidbody = m_grabbedObj.GetComponent <Rigidbody>();

        rigidbody.useGravity  = true;
        rigidbody.isKinematic = false;

        m_grabbedObj = null;
    }