7 namespace HoloToolkit.Unity.InputModule.Examples.Grabbables
17 base.Throw(grabbable);
19 Vector3 vel = LatestControllerThrowVelocity;
20 Vector3 angVel = LatestControllerThrowAngularVelocity;
21 if (GetComponent<GrabbableFixedJoint>() || GetComponent<GrabbableSpringJoint>())
23 StartCoroutine(ThrowDelay(vel, angVel, grabbable));
27 GetComponent<Rigidbody>().velocity = vel * ThrowMultiplier;
28 GetComponent<Rigidbody>().angularVelocity = angVel;
31 grabbable.GetComponent<Rigidbody>().useGravity =
false;
36 private IEnumerator ThrowDelay(Vector3 vel, Vector3 angVel,
BaseGrabbable grabbable)
39 GetComponent<Rigidbody>().velocity = vel * ThrowMultiplier;
40 GetComponent<Rigidbody>().angularVelocity = angVel;
43 grabbable.GetComponent<Rigidbody>().useGravity =
false;