Exemplo n.º 1
0
    private void GestureRecognizer_ManipulationUpdated(ManipulationUpdatedEventArgs args)
    {
        if (trackingHand.enabled && ObjectManipulationInProgress)
        {
            if (TurtorialModeEnabled)
            {
                return;
            }

            if (utilities.GetDistanceObjects(trackingHand.hand.transform, Camera.main.transform) < flowController.GetHeadDistanceUpperLimit(trackingHand.hand) + offset && // Check head-hand distance
                utilities.GetDistanceObjects(trackingHand.hand.transform, Camera.main.transform) < flowController.GetHeadDisatnceLowerLimit(trackingHand.hand) - offset && // min max
                Vector3.Magnitude(Camera.main.transform.position - initUserPos) < bodyOffset)
            {
                flowController.UserViolationDetected();
            }
            EventManager.TriggerEvent("manipulation_updated");
        }
    }