ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
357 stars 81 forks source link

TriggerHapticPulse #64

Open pdl123 opened 5 years ago

chengnay commented 5 years ago

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

pdl123 commented 5 years ago

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

------------------ 原始邮件 ------------------ 发件人: "ChengNan Yang"notifications@github.com; 发送时间: 2018年11月8日(星期四) 下午5:54 收件人: "ViveSoftware/ViveInputUtility-Unity"ViveInputUtility-Unity@noreply.github.com; 抄送: "哈哈哈"1443893035@qq.com; "Author"author@noreply.github.com; 主题: 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.

chengnay commented 5 years ago

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

Shocoben commented 5 years ago

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

byrontik1 commented 5 years ago

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

chull434 commented 5 years ago

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

byrontik1 commented 5 years ago

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.

chengnay commented 5 years ago

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

chull434 commented 5 years ago

i don't have steam vr plugin in this project

i do have the unity open vr package v1.0.2

byrontik1 commented 5 years ago

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

I have SteamVR2.01 Unity 2017.4.5f1

chengnay commented 5 years ago

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.

byrontik1 commented 5 years ago

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?

chull434 commented 5 years ago

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

chengnay commented 5 years ago

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)

lawwong commented 5 years ago

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!

byrontik1 commented 5 years ago

Thanks Iawong, I'll test soon

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.

chengnay commented 5 years ago

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.