public virtual void Release(GrabItem item)
    {
        GameObject objectInHand = item.GetObjectInHand();

        objectInHand.GetComponent <Rigidbody>().isKinematic = false;
        objectInHand.transform.SetParent(objectInHand.GetComponent <Grabbable>().Parent.transform);
    }
    public override void Release(GrabItem item)
    {
        GameObject objectInHand = item.GetObjectInHand();

        if (objectInHand != null && objectInHand.tag == "FlightStick")
        {
            objectInHand.GetComponent <FlightStick>().ReleaseHand();
            item.HandModel.SetParent(item.transform);
            item.HandModel.localPosition    = Vector3.zero;
            item.HandModel.localEulerAngles = new Vector3(-10, 0, -90);
        }
    }
예제 #3
0
    public override void Release(GrabItem item)
    {
        GameObject objectInHand = item.GetObjectInHand();

        if (objectInHand != null && objectInHand.tag == "Throttle")
        {
            objectInHand.GetComponent <ThrottleControl>().IsGrabbed = false;
            item.HandModel.SetParent(item.transform);
            item.HandModel.localPosition    = Vector3.zero;
            item.HandModel.localEulerAngles = new Vector3(-10, 0, -90);
        }
    }