//------------------------------------------------- private void OnAttachedToHand(VRTRIXGloveGrab hand) { attached = true; onPickUp.Invoke(); hand.HoverLock(null); Rigidbody rb = GetComponent <Rigidbody>(); rb.isKinematic = true; rb.interpolation = RigidbodyInterpolation.None; velocityEstimator.BeginEstimatingVelocity(); //if (hand.controller == null) //{ // velocityEstimator.BeginEstimatingVelocity(); //} attachTime = Time.time; attachPosition = transform.position; attachRotation = transform.rotation; if (attachEaseIn) { attachEaseInTransform = hand.transform; if (!Util.IsNullOrEmpty(attachEaseInAttachmentNames)) { float smallestAngle = float.MaxValue; for (int i = 0; i < attachEaseInAttachmentNames.Length; i++) { Transform t = hand.GetAttachmentTransform(attachEaseInAttachmentNames[i]); float angle = Quaternion.Angle(t.rotation, attachRotation); if (angle < smallestAngle) { attachEaseInTransform = t; smallestAngle = angle; } } } } snapAttachEaseInCompleted = false; }