Esempio n. 1
0
    IEnumerator throwPickedObjectCoroutine(Vector3 handSpeed)
    {
        yield return(new WaitForEndOfFrame());

        if (heldPickable)
        {
            heldPickable.root.transform.SetParent(null, false);
            heldPickable.root.transform.rotation = pickHandle.rotation;
            heldPickable.root.transform.position = pickHandle.position + (heldPickable.root.transform.position - heldPickable.pickHandle.transform.position);
            heldPickable.DropFunction(handSpeed * 10);
            heldPickable.OnEndLocked();
            heldPickable      = null;
            isHoldingPickable = false;
        }
    }