protected override void StartHaptics(HumanBodyBones bodyPart, BodyCoordinateHit hitLocation, float intensity) { #if VRTK_DEFINE_SDK_MANUS_VR Manus.ManusSetVibration(handData.Session, isRightGlove ? device_type_t.GLOVE_RIGHT : device_type_t.GLOVE_LEFT, intensity, (ushort)hapticDuration); #endif }
protected override void CancelHaptics() { #if VRTK_DEFINE_SDK_MANUS_VR Manus.ManusSetVibration(handData.Session, isRightGlove ? device_type_t.GLOVE_RIGHT : device_type_t.GLOVE_LEFT, 0, (ushort)hapticDuration); #endif }
/// <summary> /// Makes the motor in the Manus Glove vibrate for a certain duration /// </summary> /// <param name="aPower">The power of the motor from 0 to 1</param> /// <param name="aDuration">The duration in seconds</param> public int SetVibrationPeriod(float aPower, float aDuration) { if (timer == null || timer.Enabled) { return(Manus.ERROR); } timer.Interval = aDuration * 1000.0; timer.Start(); return(Manus.ManusSetVibration(hand, aPower)); }
public void VibrateSoftRight() { Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_RIGHT, 0.8f, 150); }
public void VibrateVerySoftLeft() { Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_LEFT, 0.6f, 300); }
public void VibrateVerySoftRight() { Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_RIGHT, 0.5f, 300); }
public void VibrateSoftLeft() { Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_LEFT, 0.9f, 150); }
/// <summary> /// Vibrate the glove /// </summary> private void VibrateHand() { Manus.ManusSetVibration(HandData.Session, DeviceType, 0.7f, 150); }
/// <summary> /// Makes the motor in the Manus Glove vibrate at a constant power. /// If the motor is currently set with SetVibrationPeriod, that timer is stopped. /// Turn the motor off by setting the power to 0. /// </summary> /// <param name="aPower">The power of the motor from 0 to 1</param> public int SetConstantVibration(float aPower) { return(Manus.ManusSetVibration(hand, aPower)); }
private void Timer_Elapsed(object sender, ElapsedEventArgs e) { Manus.ManusSetVibration(hand, 0.0f); }
//vibrate right hand private void VibrateHandRight() { Manus.ManusSetVibration(HandData.Instance.Session, DeviceTypeRight, 0.7f, 150); }
/// <summary> /// Vibrate the glove /// </summary> private void VibrateHand(device_type_t device) { Manus.ManusSetVibration(HandData.Instance.Session, device, 0.7f, 150); }