/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } if (!guidList.Contains(grabbedGuid)) { //guidList.Add(grabbedGuid); gameObject.GetComponent <NodeLink>().Fire("UnlockItem", grabbedGuid); } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; //isAvailable = true; currentInputSource = null; currentInputSourceId = 0; if (hostRigidbody != null) { hostRigidbody.isKinematic = hostRigidbodyWasKinematic; } StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); throwVector = (HostTransform.position - prevPos) * UserStrong; if (gameObject.GetComponent <Rigidbody>()) { if (gravity) { gameObject.GetComponent <Rigidbody>().useGravity = true; } gameObject.GetComponent <Rigidbody>().isKinematic = false; //gameObject.GetComponent<Rigidbody>().velocity = Vector3.zero; gameObject.GetComponent <Rigidbody>().AddForce(throwVector); //Debug.Log(throwVector); } }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; _isDragging = false; currentInputSource = null; currentInputSourceId = 0; if (hostRigidbody != null) { hostRigidbody.isKinematic = hostRigidbodyWasKinematic; draggingRigid = null; // } /* * if (_hostRigidbody != null) { * _hostRigidbody.isKinematic = _hostRigidbodyWasKinematic; * } */ StoppedDragging.RaiseEvent(); }
// From HandDraggable.cs /// <summary> /// Stops dragging the object. /// </summary> private void StopDragging() { if (!isDragging) { return; } isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; isShareDrag = 0; //放したら壁に貼り付ける //if (shoutotu == true) //{ // obj.transform.position = placementPosition; // obj.transform.rotation = rotation; // pos = placementPosition; // rot = rotation; // body = obj.GetComponent<Rigidbody>(); // body.isKinematic = true; // obj.transform.transform.Find("HoloStickyUI").transform.transform.Find("Image").GetComponent<StickyFaceMe>().enabled = false; // obj.transform.transform.Find("BackFace").GetComponent<StickyFaceMe>().enabled = false; // sendFlag = 1; // int ind = Data.shareStickyList.IndexOf(obj); // if (ind != -1) // { // Data.WallStickyList[ind] = 1; // //CustomMessages.Instance.SendMovePos(pos, rot, ind, isShareDrag); // } // ind = -1; // obj = null; // shoutotu = false; //} index = -1; //isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stop dragging /// </summary> public void StopDragging() { if (!isDragging) { return; } isDragging = false; if (hostRigidbody != null) { hostRigidbody.isKinematic = hostRigidbodyWasKinematic; } StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { this.GetComponentInParent <Rigidbody>().useGravity = true; if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; GameObject.Find("StageCollection").SendMessage("UpdateDragging", "null"); Debug.Log("Stopped Dragging " + this.name); currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } gameObject.GetComponent <Rigidbody>().AddForce((gameObject.transform.position - lastPosition) * 750); gameObject.GetComponent <Rigidbody>().useGravity = true; // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); //put hidden object back for (int i = 0; i < objectsToHide.Length; i++) { objectsToHide[i].SetActive(true); //or renderer instead? } isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; currentInputSource = null; if (popupMenu) { popupMenu.parent = null; popupMenu.gameObject.SetActive(true); } StoppedDragging.RaiseEvent(); }
/// <summary> /// Stops dragging the object. /// </summary> public void StopDragging() { if (!isDragging) { GetComponent <Rigidbody>().useGravity = true; return; } // Remove self as a modal input handler InputManager.Instance.PopModalInputHandler(); isDragging = false; currentInputSource = null; StoppedDragging.RaiseEvent(); picked = false; GetComponent <Rigidbody>().isKinematic = false; if (snapped) { Vector3 size = myCollider.size; size.y = 0.1f; myCollider.size = size; GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePosition | RigidbodyConstraints.FreezeRotation; for (int i = 0; i < meshRenderers.Length; ++i) { meshRenderers[i].material = defaultMaterial; } trainEvent.Solved = true; } else { Vector3 size = myCollider.size; size.y = 0.2f; myCollider.size = size; } }