void OnGUI() { if (infoGuiText != null && interactionManager != null && interactionManager.IsInteractionInited()) { string sInfo = string.Empty; long userID = interactionManager.GetUserID(); if (userID != 0) { if (draggedObject != null) { sInfo = "Dragging the " + draggedObject.name + " around."; } else { sInfo = "Please grab and drag an object around."; } } else { KinectManager kinectManager = KinectManager.Instance; if (kinectManager && kinectManager.IsInitialized()) { sInfo = "Waiting for Users..."; } else { sInfo = "Kinect is not initialized. Check the log for details."; } } infoGuiText.text = sInfo; } }
void OnGUI() { if (infoGuiText != null && interactionManager != null && interactionManager.IsInteractionInited()) { string sInfo = string.Empty; long userID = interactionManager.GetUserID(); if (userID != 0) { if (draggedObject != null) { sInfo = "MEMINDAHKAN " + draggedObject.name + " ."; } else { sInfo = "SILAHKAN PINDAHKAN 3 KOTAK MEDIS KE KASUR."; } } else { KinectManager kinectManager = KinectManager.Instance; if (kinectManager && kinectManager.IsInitialized()) { sInfo = "Waiting for Users..."; } else { sInfo = "Kinect is not initialized. Check the log for details."; } } infoGuiText.text = sInfo; } }
void OnGUI() { if (infoGuiText != null && interactionManager != null && interactionManager.IsInteractionInited()) { string sInfo = string.Empty; long userID = interactionManager.GetUserID(); if (userID != 0) { if (selectedObject != null) { sInfo = selectedObject.name + " grabbed.\nYou can turn it now in all directions."; } else { sInfo = "Grab the object to turn it."; } } else { KinectManager kinectManager = KinectManager.Instance; if (kinectManager && kinectManager.IsInitialized()) { sInfo = "Waiting for Users..."; } else { sInfo = "Kinect is not initialized. Check the log for details."; } } infoGuiText.text = sInfo; } }
public void HandGripDetected(long userId, int userIndex, bool isRightHand, bool isHandInteracting, Vector3 handScreenPos) { if (!isHandInteracting || !interactionManager) { return; } if (userId != interactionManager.GetUserID()) { return; } controller.SendMessage("toggle", true); lastHandEvent = InteractionManager.HandEventType.Grip; //isLeftHandDrag = !isRightHand; }
public void HandGripDetected(long userId, int userIndex, bool isRightHand, bool isHandInteracting, Vector3 handScreenPos) { if (!isHandInteracting || !interactionManager) { return; } if (userId != interactionManager.GetUserID()) { return; } lastHandEvent = InteractionManager.HandEventType.Grip; //isLeftHandDrag = !isRightHand; screenNormalPos = handScreenPos; }
void OnGUI() { if (UIinfo != null && manager != null && manager.IsInteractionInited()) { string sInfo = string.Empty; uint userID = manager.GetUserID(); if (userID != 0) { if (draggedObject != null) { sInfo = "Dragging the " + draggedObject.name + " around."; } else { sInfo = "Grab and drag an object around."; } } else { sInfo = "Waiting for Users..."; } UIinfo.text = sInfo; } }
public void HandGripDetected(long userId, int userIndex, bool isRightHand, bool isHandInteracting, Vector3 handScreenPos) { if (!isHandInteracting || !interactionManager) { return; } if (userId != interactionManager.GetUserID()) { return; } if (isRightHand) { if (puntoCalibracion1 == new Vector3(0, 0, 0)) { puntoCalibracion1 = rightFootPos; } else if (puntoCalibracion2 == new Vector3(0, 0, 0)) { puntoCalibracion2 = rightFootPos; } else if (puntoCalibracion3 == new Vector3(0, 0, 0)) { puntoCalibracion3 = rightFootPos; } else if (puntoCalibracion4 == new Vector3(0, 0, 0)) { puntoCalibracion4 = rightFootPos; } else//Si tenemos todos rellenos y cerramos el puño de nuevo limpiamos { if (!calibracionConfirmada) { puntoCalibracion1 = new Vector3(0, 0, 0); puntoCalibracion2 = new Vector3(0, 0, 0); puntoCalibracion3 = new Vector3(0, 0, 0); puntoCalibracion4 = new Vector3(0, 0, 0); } } if (textCalib1 != null && textCalib2 != null && textCalib3 != null && textCalib4 != null) { textCalib1.text = "Calibration point 1:" + puntoCalibracion1.ToString(); textCalib2.text = "Calibration point 2:" + puntoCalibracion2.ToString(); textCalib3.text = "Calibration point 3:" + puntoCalibracion3.ToString(); textCalib4.text = "Calibration point 4:" + puntoCalibracion4.ToString(); } } }
void OnGUI() { if (infoGuiText != null && manager != null && manager.IsInteractionInited()) { string sInfo = string.Empty; long userID = manager.GetUserID(); if (userID != 0) { if (draggedObject != null) { sInfo = "Dragging the " + draggedObject.name + " around."; } else { sInfo = "Please grab and drag an object around."; } } else { KinectManager kinectManager = KinectManager.Instance; if (kinectManager && kinectManager.IsInitialized()) { sInfo = "Waiting for Users..."; } else { sInfo = "Kinect is not initialized. Check the log for details."; } } infoGuiText.GetComponent <GUIText>().text = (manager.GetLastLeftHandEvent() == InteractionManager.HandEventType.Grip || manager.GetLastRightHandEvent() == InteractionManager.HandEventType.Grip) + " isGrabbed"; //infoGuiText.GetComponent<GUIText>().text = draggedObject.transform.position.z.ToString(); } }