示例#1
0
    public VRGrabbable Grab(VRGrabber grabber)
    {
        if (grabbed)
        {
            if (grabbedBy != null)
            {
                // Inform current grabber that it is not grabbing us anymore
                grabbedBy.OnGrabbedAway();
            }
            else
            {
                throw new System.Exception("grabbedBy was null but grabbed was true!");
            }
        }

        grabbedBy = grabber;
        grabbed   = true;

        return(this);
    }