예제 #1
0
    void LetGo()
    {
        interactionObj.rb.useGravity = true;

        if (currentForce.Value >= 1f)
        {
            interactionObj.rb.AddForce(cam.transform.forward * currentForce.Value, ForceMode.Impulse);
            interactionObj.rb.angularVelocity = new Vector3(Random.Range(10f, 200f), Random.Range(10f, 200), Random.Range(10f, 200));
            interactionObj.interactable       = false;
        }
        else
        {
            dragger.StartPositionReset(interactionObj);
        }
        isDragging = false;
        coActive   = false;
    }