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; }
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); }
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 */ }
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); }
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); }
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; }
public abstract void SetGrabableObjectConfiguration(DIOController grabableObject, int id);
public abstract void SetGrabableObjectPosition(DIOController grabableObject, Vector3 visualizationCenter, float spacing, int index);