ViveInputUtility-Unity icon indicating copy to clipboard operation
ViveInputUtility-Unity copied to clipboard

TriggerHapticPulse

Open pdl123 opened this issue 6 years ago • 17 comments

pdl123 avatar Nov 08 '18 03:11 pdl123

Can you provide below information, Which Unity version? Which SteamVR Plugin version? Which VIU version? Which scene did you overcome this issue?

chengnay avatar Nov 08 '18 09:11 chengnay

Unity version with 2018.2.14f1, SteamVR Plugin version with ver2.0.1,VIU version with ver.1.9.0.

------------------ 原始邮件 ------------------ 发件人: "ChengNan Yang"[email protected]; 发送时间: 2018年11月8日(星期四) 下午5:54 收件人: "ViveSoftware/ViveInputUtility-Unity"[email protected]; 抄送: "哈哈哈"[email protected]; "Author"[email protected]; 主题: Re: [ViveSoftware/ViveInputUtility-Unity] TriggerHapticPulse (#64)

Can you provide below information, Which Unity version? Which SteamVR Plugin version? Which VIU version?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

pdl123 avatar Nov 08 '18 10:11 pdl123

https://github.com/ViveSoftware/ViveInputUtility-Unity/issues/54#issue-363904294 Currently, we are working on this issue.

chengnay avatar Nov 08 '18 10:11 chengnay

Duplicate of https://github.com/ViveSoftware/ViveInputUtility-Unity/issues/23

Shocoben avatar Nov 15 '18 20:11 Shocoben

I have not been able to get the hapticstack to work with linearmapping, the provide example of linearmapping does not appear to have haptic working either. Is this related to the same problem as mentioned above? thanks

byrontik1 avatar Dec 03 '18 03:12 byrontik1

Same here ViveInput.TriggerHapticPulse(role); doesn't work Unity 2018.3.1 SteamVR 1.2.7 VIU v1.10 any scene

chull434 avatar Jan 16 '19 23:01 chull434

Using SteamVR 2.0 Unity 2017.4.5f1 I do get a little jolt at the end of a rotation one way with CircularMapping, don't think I have figured out LinearMapping yet, I'd love to know as every person I show the levers mentions how cool haptics would be.

byrontik1 avatar Jan 17 '19 03:01 byrontik1

@chull434 May I know what is your SteamVR plugin version?

chengnay avatar Jan 17 '19 03:01 chengnay

i don't have steam vr plugin in this project

i do have the unity open vr package v1.0.2

chull434 avatar Jan 17 '19 03:01 chull434

@chull434 May I know what is your SteamVR plugin version?

I have SteamVR2.01 Unity 2017.4.5f1

byrontik1 avatar Jan 17 '19 03:01 byrontik1

i don't have steam vr plugin in this project

i do have the unity open vr package v1.0.2

Currently, without SteamVR plugin you are not able to get haptic pulse.

chengnay avatar Jan 17 '19 03:01 chengnay

Chengnay, is it correct that the HapticStack doesn't trigger haptic feedback with the current lineardrive and linearmapping as per example? Or do I need to set something specific?

byrontik1 avatar Jan 17 '19 04:01 byrontik1

i don't have steam vr plugin in this project i do have the unity open vr package v1.0.2

Currently, without SteamVR plugin you are not able to get haptic pulse.

yes needed steam vr, all working now, thanks

chull434 avatar Jan 17 '19 05:01 chull434

Chengnay, is it correct that the HapticStack doesn't trigger haptic feedback with the current lineardrive and linearmapping as per example? Or do I need to set something specific?

Could you explain what is linearmapping and circularmapping? Which VIU example you are referring to? I tried ViveInput.TriggerHapticPulse(role) and it is working (not sure why sometimes it might fail, I am still looking into this issue)

chengnay avatar Jan 17 '19 05:01 chengnay

I fixed haptics problem and pushed the latest commit d6223377f9b12cb8cafdd7dfb7bd4f15df84f899 Also add new input API:

ViveInput.TriggerHapticVibrationEx<TRole>(
    TRole role,
    float durationSeconds = 0.01f,
    float frequency = 85f,
    float amplitude = 0.125f,
    float startSecondsFromNow = 0f)

Notice that this commit have added new actions, so you need to apply VIU Action Set again. Let us know if it works! Thanks!

lawwong avatar Jan 17 '19 11:01 lawwong

Thanks Iawong, I'll test soon

  • Chengnay Linear Drive which uses the LinearMapping component (script) and Circular Drive which uses Circular drive script and generates a Linearmapping component prefabs can be found demonstrated in SteamVR/InteractionSystem/Samples/interactionSample

The LinearDrive has the Haptic Rack (script)component which should give some nice teeth like haptics, so far I haven't had it working, although I didn't spend time on it, perhaps the work what Iawong did fixed it. hope this explains it.

byrontik1 avatar Jan 18 '19 05:01 byrontik1

Thanks Iawong, I'll test soon

  • Chengnay Linear Drive which uses the LinearMapping component (script) and Circular Drive which uses Circular drive script and generates a Linearmapping component prefabs can be found demonstrated in SteamVR/InteractionSystem/Samples/interactionSample

The LinearDrive has the Haptic Rack (script)component which should give some nice teeth like haptics, so far I haven't had it working, although I didn't spend time on it, perhaps the work what Iawong did fixed it. hope this explains it.

I just tried the InteractionExample scene and I can get the haptic working in that scene. You need to grab the handle with one of your controller then use another controller to overlap the other controller to feel the haptic. I didn't use this script with VIU example scene, if you still have haptic issue, please feel free to let us know.

chengnay avatar Jan 18 '19 07:01 chengnay