public void connectAllFingerPoints(InteractionObject obj, InteractionPointConnectMethod method)
 {
     foreach (InteractionPoint p in trackedFingerPoints)
     {
         p.connectToObject(obj, method);
     }
 }
    public void connectToObject(InteractionObject obj, InteractionPointConnectMethod connectMode = InteractionPointConnectMethod.MIRROR)
    {
        _interactionObject = obj;

        if (connectMode == InteractionPointConnectMethod.MIRROR)
        {
            connectToObjectMirror(obj);
        }
        else
        {
            if (connectMode == InteractionPointConnectMethod.SURFACE)
            {
                connectToObjectSurface(obj);
            }
            else
            {
                if (obj.isInsideW(_globalPosition, InteractionHand.SIZE) == (connectMode == InteractionPointConnectMethod.INSIDE))
                {
                    connectToObjectMirror(obj);
                }
                else
                {
                    connectToObjectSurface(obj);
                }
            }
        }

        _isConnected = true;
    }
 public void connectFingerPointsIfInside(InteractionPointConnectMethod method)
 {
     foreach (GameObject closeObject in _closeObjects)
     {
         foreach (InteractionPoint p in trackedFingerPoints)
         {
             if (!p.isConnected)
             {
                 InteractionObject interactionObject = InteractionObject.getInteractionObject(closeObject);
                 p.tryConnectForPush(interactionObject);
             }
         }
     }
 }
示例#4
0
    public void connectToObject(InteractionObject obj, InteractionPointConnectMethod connectMode = InteractionPointConnectMethod.MIRROR)
    {
        _interactionObject = obj;

        if (connectMode == InteractionPointConnectMethod.MIRROR) {
            connectToObjectMirror(obj);
        } else {
            if (connectMode == InteractionPointConnectMethod.SURFACE) {
                connectToObjectSurface(obj);
            } else {
                if (obj.isInsideW(_globalPosition, InteractionHand.SIZE) == (connectMode == InteractionPointConnectMethod.INSIDE)) {
                    connectToObjectMirror(obj);
                } else {
                    connectToObjectSurface(obj);
                }
            }
        }

        _isConnected = true;
    }
示例#5
0
 public void connectFingerPointsIfInside(InteractionPointConnectMethod method)
 {
     foreach (GameObject closeObject in _closeObjects) {
         foreach (InteractionPoint p in trackedFingerPoints) {
             if (!p.isConnected) {
                 InteractionObject interactionObject = InteractionObject.getInteractionObject(closeObject);
                 p.tryConnectForPush(interactionObject);
             }
         }
     }
 }
示例#6
0
 public void connectAllFingerPoints(InteractionObject obj, InteractionPointConnectMethod method)
 {
     foreach (InteractionPoint p in trackedFingerPoints) {
         p.connectToObject(obj, method);
     }
 }