Ejemplo n.º 1
0
        private void transformSingleAnchor(LeapPinchDetector singlePinch)
        {
            _anchor.position = singlePinch.Position;

            switch (_oneHandedRotationMethod)
            {
            case RotationMethod.None:
                break;

            case RotationMethod.Single:
                Vector3 p = singlePinch.Rotation * Vector3.right;
                p.y = _anchor.position.y;
                _anchor.LookAt(p);
                break;

            case RotationMethod.Full:
                _anchor.rotation = singlePinch.Rotation;
                break;
            }

            _anchor.localScale = Vector3.one;
        }
Ejemplo n.º 2
0
    private void transformSingleAnchor(LeapPinchDetector singlePinch) {
      _anchor.position = singlePinch.Position;

      switch (_oneHandedRotationMethod) {
        case RotationMethod.None:
          break;
        case RotationMethod.Single:
          Vector3 p = singlePinch.Rotation * Vector3.right;
          p.y = _anchor.position.y;
          _anchor.LookAt(p);
          break;
        case RotationMethod.Full:
          _anchor.rotation = singlePinch.Rotation;
          break;
      }

      _anchor.localScale = Vector3.one;
    }