Example #1
0
 /// <summary>
 /// Removes the physics ignore for the steam controllers
 /// </summary>
 void RemoveIgnoreAllControllerColliders()
 {
     foreach (SteamVR_TrackedObject controller in VRGripper.GetControllers())
     {
         RemoveIgnoreColliders(controller.transform);
     }
 }
Example #2
0
    void OnCollisionEnter(Collision _collision)
    {
        if (_collision.rigidbody == null)
        {
            return;
        }

        controller = _collision.rigidbody.GetComponent <VRGripper> ();

        // If we have been moved by a vr object...
        if (controller == null)
        {
            return;
        }

        // Found gripper beginning actions
        BeginAction();
    }
Example #3
0
    void OnCollisionExit(Collision _collision)
    {
        //Debug.Log ("Attempting Exiting with " + _collision.gameObject.name);
        if (_collision.rigidbody == null)
        {
            return;
        }

        //Debug.Log ("Have rigidbody");
        VRGripper gripper = _collision.rigidbody.GetComponent <VRGripper> ();

        // If it is the same gripper...
        if (controller != gripper)
        {
            return;
        }

        // lost gripper ending actions
        EndAction();
    }