public void IgnoreObject(IF_VR_Steam_InteractableDebug otherInteractable)
        {
            Collider[] otherColliders = otherInteractable.GetColliders();

            for (int myIndex = 0; myIndex < colliders.Length; myIndex++)
            {
                for (int otherIndex = 0; otherIndex < otherColliders.Length; otherIndex++)
                {
                    Physics.IgnoreCollision(colliders[myIndex], otherColliders[otherIndex]);
                }
            }
        }
        private IF_VR_Steam_InteractableDebug CreateSimulation(IF_VR_Steam_Hand fromHand, float timeOffset, Color copyColor)
        {
            GameObject copy = GameObject.Instantiate(this.gameObject);
            IF_VR_Steam_InteractableDebug debugCopy = copy.GetComponent <IF_VR_Steam_InteractableDebug>();

            debugCopy.SetIsSimulation();
            debugCopy.ColorSelf(copyColor);
            copy.name = string.Format("{0} [offset: {1:0.000}]", copy.name, timeOffset);

            Vector3 velocity = fromHand.GetTrackedObjectVelocity(timeOffset);

            velocity *= throwable.scaleReleaseVelocity;

            debugCopy.rigidbody.velocity = velocity;

            return(debugCopy);
        }
        private void OnDetachedFromHand(IF_VR_Steam_Hand hand)
        {
            if (isThrowable)
            {
                Vector3 velocity;
                Vector3 angularVelocity;

                throwable.GetReleaseVelocities(hand, out velocity, out angularVelocity);

                CreateMarker(Color.cyan, velocity.normalized);
            }

            CreateMarker(Color.red);
            attachedToHand = null;

            if (isSimulation == false && simulateReleasesForXSecondsAroundRelease != 0)
            {
                float startTime = -simulateReleasesForXSecondsAroundRelease;
                float endTime   = simulateReleasesForXSecondsAroundRelease;

                List <IF_VR_Steam_InteractableDebug> list = new List <IF_VR_Steam_InteractableDebug>();
                list.Add(this);

                for (float offset = startTime; offset <= endTime; offset += simulateReleasesEveryXSeconds)
                {
                    float lerp = Mathf.InverseLerp(startTime, endTime, offset);
                    IF_VR_Steam_InteractableDebug copy = CreateSimulation(hand, offset, Color.Lerp(Color.red, Color.green, lerp));
                    list.Add(copy);
                }

                for (int index = 0; index < list.Count; index++)
                {
                    for (int otherIndex = 0; otherIndex < list.Count; otherIndex++)
                    {
                        list[index].IgnoreObject(list[otherIndex]);
                    }
                }
            }
        }