예제 #1
0
    void OnControllerPinchStay(InteractionController controller)
    {
        var index    = controller.isRight ? 1 : 0;
        var pinchPos = controller.GetPinchPosition();

        _grabCurPositions[index] = pinchPos;
    }
예제 #2
0
    void OnControllerPinchBegin(InteractionController controller)
    {
        _pinchBeginControllers.Add(controller);
        // Debug.Log("pinch begin " + (controller.isLeft ? "left" : "right"));
        var index    = controller.isRight ? 1 : 0;
        var pinchPos = controller.GetPinchPosition();

        _grabPrevPositions[index] = _grabCurPositions[index] = pinchPos;
    }