public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType) { base.OnHandleTrigger(camera, handleType); OnSetPutItOnTheObject(false); handlePos = transform.localPosition; OnPickUp(); }
/// <summary> /// 拾取 /// </summary> /// <param name="camera"></param> public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType) { mHandleType = handleType; transform.eulerAngles = targetRot; isPut = false; isHandle = true; cameraTra = camera; m_IntersectPlane = (cameraTra.position.z < 0) ? m_IntersectPlanePositive : m_IntersectPlaneNegative; OnPickUp(); }
public static NoloDevice GetDevice(NoloDeviceType deviceIndex) { if (devices == null) { devices = new NoloDevice[NoloVR_Plugins.trackedDeviceNumber]; for (int i = 0; i < devices.Length; i++) { devices[i] = new NoloDevice(i); } } return(devices[(int)deviceIndex]); }
public override void OnReleseTrigger(NoloDeviceType handleType) { base.OnReleseTrigger(handleType); if (brokenTra == null) { return; } if (transform.position.y >= brokenTra.position.y) { _isBroken = true; } else { _isBroken = false; } }
/// <summary> /// 放下 /// </summary> public override void OnReleseTrigger(NoloDeviceType handleType) { isPut = true; mHandleType = handleType; SetParent(); OnPutDown(); transform.eulerAngles = defaultWorldRot; for (int i = 0; i < outLine.Length; i++) { if (outLine[i] == null) { continue; } outLine[i].color = 0; outLine[i].enabled = false; } }
/// <summary> /// 拾取 /// </summary> /// <param name="camera"></param> public virtual void OnHandleTrigger(Transform camera, NoloDeviceType handleType) { mHandleType = handleType; transform.eulerAngles = targetRot; isPut = false; cameraTra = camera; m_IntersectPlane = (cameraTra.position.z < 0) ? m_IntersectPlanePositive : m_IntersectPlaneNegative; isCountDown = false; currentTime = 0; if (entityID != null && entityID.Count > 0) { DataTools.SendImageToAndroid(entityID); } OnPickUp(); }
/// <summary> /// 放下 /// </summary> public virtual void OnReleseTrigger(NoloDeviceType handleType) { isPut = true; mHandleType = handleType; SetParent(); OnPutDown(); transform.eulerAngles = defaultWorldRot; isCountDown = true; currentTime = 0; for (int i = 0; i < outLine.Length; i++) { if (outLine[i] == null) { continue; } outLine[i].color = 0; outLine[i].enabled = false; } if (this.transform.localPosition.y < -1f) { Debug.Log("移出太远"); this.transform.localPosition = defaultLoacalPos; } }
public static extern ControllerStates get_Nolo_ControllerStates(NoloDeviceType devicetype);
void OnEnable() { InitPointer(); deviceType = GetComponent <NoloVR_TrackedDevice>().deviceType; }
public static Nolo_Transform GetPose(NoloDeviceType type) { return(GetPose((int)type)); }
public static bool GetNoloConnectStatus(NoloDeviceType type) { return(GetNoloConnectStatus((int)type)); }
public static void TriggerHapticPulse(NoloDeviceType type, int intensity) { TriggerHapticPulse((int)type, intensity); }
public void OnPickUp(NoloDeviceType var, Transform other) { OnGetScript(other)?.OnHandleTrigger(mainCamera.transform, var); }
public override void OnReleseTrigger(NoloDeviceType handleType) { base.OnReleseTrigger(handleType); }
public static extern int get_Nolo_VersionID(NoloDeviceType devicetype);
public static extern int get_Nolo_Battery(NoloDeviceType devicetype);
public static extern int get_Nolo_StateByDeviceType(NoloDeviceType devicetype);
public static extern void set_Nolo_TriggerHapticPulse(NoloDeviceType deviceType, int intensity);
public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType) { base.OnHandleTrigger(camera, handleType); }
public static extern Nolo_Pose get_Nolo_Pose(NoloDeviceType devicetype);
#pragma warning disable IDE0051 // 删除未使用的私有成员 private void OnEnable() #pragma warning restore IDE0051 // 删除未使用的私有成员 { InitPointer(); deviceType = GetComponent <NoloVR_TrackedDevice>().deviceType; }
public static Nolo_ControllerStates GetControllerStates(NoloDeviceType type) { return(GetControllerStates((int)type)); }
private void OnExit(NoloDeviceType var, Transform other) { OnGetScript(other)?.OnReleseTrigger(var); }
public static int GetElectricity(NoloDeviceType type) { return(GetElectricity((int)type)); }