Esempio n. 1
0
        public void Initialize(DIOController fatherDioController, int id)
        {
            _id = id;

            if (fatherDioController.DioManager.usePitchGrab && (pinchDetectorLeft == null || pinchDetectorRight == null))
            {
                Debug.LogWarning(
                    "Both Pinch Detectors of the LeapRTS component must be assigned. This component has been disabled.");
                enabled = false;
                return;
            }

            dioController = fatherDioController;
            enabled       = true;
            isSelected    = false;

            hapticDetector.Initialize(fatherDioController.DioManager);

            objectMeshRender = GetComponent <MeshRenderer>();

            var pinchControl = new GameObject("DIO Anchor");

            _anchor = pinchControl.transform;
            _anchor.transform.parent = transform.parent;
            transform.parent         = _anchor;

            isPinched        = false;
            _isLookPointerOn = false;
        }
Esempio n. 2
0
        public override void SetGrabableObjectPosition(DIOController grabableObject, Vector3 sphereCenter, float radius, int index)
        {
            var angle    = index * angleDistance;
            var position = RandomCircle(sphereCenter, radius, angle);

            grabableObject.transform.position = position;
            grabableObject.transform.LookAt(transform);
        }
Esempio n. 3
0
        public override void SetGrabableObjectPosition(DIOController grabableObject, Vector3 planeCenter, float distance, int index)
        {
            var angle = index * angleDistance;          /* i * distancia entre los angulos calculada en CreateVisualization */

            var position = RandomPlane(planeCenter, distance, index);

            grabableObject.transform.position = position;       /* le asigna la posición calculada al objeto */
        }
Esempio n. 4
0
        public override void SetGrabableObjectConfiguration(DIOController grabableObject, int id)
        {
            if (dioManager.usePitchGrab)
            {
                grabableObject.pitchGrabObject.pinchDetectorLeft  = dioManager.pinchDetectorLeft;
                grabableObject.pitchGrabObject.pinchDetectorRight = dioManager.pinchDetectorRight;
            }

            grabableObject.Initialize(this, id);
        }
Esempio n. 5
0
        public override void SetGrabableObjectConfiguration(DIOController grabableObject, int id)
        {
            //DELETE THIS change to new archtecture
            if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "usePitchGrab"))
            {
                grabableObject.pitchGrabObject.pinchDetectorLeft  = InteractionManager.Instance.pitchGrabManager.pinchDetectorLeft;
                grabableObject.pitchGrabObject.pinchDetectorRight = InteractionManager.Instance.pitchGrabManager.pinchDetectorRight;
            }

            grabableObject.Initialize(this, id);
        }
Esempio n. 6
0
        public void Initialize(DIOController fatherDioController, int id)
        {
            _id = id;

            if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UsePitchGrab") && (pinchDetectorLeft == null || pinchDetectorRight == null))
            {
                Debug.LogWarning(
                    "Both Pinch Detectors of the LeapRTS component must be assigned. This component has been disabled.");
                enabled = false;
                return;
            }

            dioController = fatherDioController;
            enabled       = true;
            isSelected    = false;
            isClone       = false;

            if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode"))
            {
                isSelectedCat1 = isSelectedCat2 = isSelectedCat3 = isSelectedCat4 = false;
            }
            else
            {
                //DELETE THIS untie from DIOManager
                //hapticDetector.Initialize(fatherDioController.DioManager);
            }
            objectMeshRender = GetComponent <MeshRenderer>();

            var pinchControl = new GameObject("DIO Anchor");

            _anchor = pinchControl.transform;
            _anchor.transform.parent = transform.parent;
            transform.parent         = _anchor;

            isPinched        = false;
            _isLookPointerOn = false;
        }
Esempio n. 7
0
 public abstract void SetGrabableObjectConfiguration(DIOController grabableObject, int id);
Esempio n. 8
0
 public abstract void SetGrabableObjectPosition(DIOController grabableObject, Vector3 visualizationCenter, float spacing, int index);