public static void CheckHandTarget(Handle handle)
        {
            HandTarget handTarget = (HandTarget)EditorGUILayout.ObjectField("Hand Target", handle.handTarget, typeof(HandTarget), true);

            if (handTarget != handle.handTarget)
            {
                if (handTarget != null)
                {
                    if (handle.handTarget != null)
                    {
                        HandInteraction.LetGo(handle.handTarget);
                    }
                    if (handTarget.grabbedObject != null)
                    {
                        HandInteraction.LetGo(handTarget);
                    }

                    HandInteraction.MoveAndGrabHandle(handTarget, handle);
                    handTarget.transform.parent = handle.transform;
                }
                else
                {
                    HandInteraction.LetGo(handle.handTarget);
                }
            }
        }
示例#2
0
 public void LetGo()
 {
     if (handTarget != null && handTarget.grabbedObject != null)
     {
         Debug.Log("LetGo" + handTarget + " " + handTarget.grabbedObject);
         HandInteraction.LetGo(handTarget);
     }
 }
示例#3
0
 private void LetGoObject(HandTarget handTarget)
 {
     HandInteraction.LetGo(handTarget);
     grabbedObjectProp.objectReferenceValue = null;
 }