Closed SoumyaBasheer closed 3 years ago
@SoumyaBasheer Could you list the Unity Editor, VIU and SDK version?
UPDATE: I think Cosmos controller's A(X) and B(Y) buttons do not support touch event. I tested with the SteamVR Controller Settings>Test Controller, in that UI, it does not show any touch event (usually will light up when button is touched).
But, when I tested Index controller, it will light up when I touch the A & B buttons.
Hi @chengnay I don't get press or touch of A(X). I also tried ViveInput.GetPressDown(HandRole.LeftHand, ControllerButton.AKey) While testing through SteamVR Controller Settings>Test Controller I could see the Press of X and A buttons.
I used ViveInputUtility from assetstore (https://assetstore.unity.com/packages/tools/integration/vive-input-utility-64219) Unity Version - 2019.4.2 VIU Version - 1.12.0.0 One more update that I am getting B(Y) Press event in Unity using VIU. Issue is only for A(X)
Are you testing this in VIU’s example scene?
UPDATE: I tested with VIU's Teleport example scene, and the AKey is working
BTW, I am using ViveInput.GetPress(HandRole.RightHand, ControllerButton.AKey), could you try if it works for you too?
@chengnay I checked this but I am not getting Akey. but Bkey is working perfectly. Whether I miss anything? I just imported VIU Package only. Whether I need to import anything else?
Could you provide a sample project that can reproduce this issue for debugging?
@chengnay I have uploaded a sample in the link https://drive.google.com/file/d/1J3uib08xXSGoMsetuUpLrn1O7ga6ErNb/view?usp=sharing. Can test it using Test Scene and put a Error log in TestScript for A and B key press.
It seems like you did not use SteamVR Unity Plugin, only install OpenVR Desktop plugin from Unity Package Manager.
Here is the fix to your issue.
In Assets\HTC.UnityPlugin\VRModule\Modules\UnityEngineVRModule.cs, For function Update_L_Vive, Add below lines, var primaryButtonPress = GetUnityButton(3); currState.SetButtonPress(VRModuleRawButton.A, primaryButtonPress);
Do the same for Update_R_Vive, var primaryButtonPress = GetUnityButton(1); currState.SetButtonPress(VRModuleRawButton.A, primaryButtonPress);
Sorry for the inconvenience!
@chengnay Thank you It worked for me. Do I need to use SteamVR Unity Plugin. I just wanted some interaction and teleporting I hope it can acheive using OpenVR and VIU. Please correct me if am wrong
@SoumyaBasheer It is your choice to use SteamVR Unity Plugin or not. If you would like to use trackers, then you MUST import SteamVR Unity Plugin. As for interaction and teleport, OpenVR and VIU will be enough for now. You can always expand your project with SDKs(such as SteamVR Unity Plugin), VIU will take care of everything.
@chengnay Thank you for the update. I hope this issue will fix in Next version. Thank you so much for the quick response.
@SoumyaBasheer Yes, this fix will be included in the next release. Thanks for your support. :)
I used ViveInput.GetPressDown(HandRole.LeftHand, ControllerButton.AKeyTouch) for getting X button press in left hand and ViveInput.GetPressDown(HandRole.RightHand, ControllerButton.AKeyTouch) for getting A button press in right hand , but its not working in vive cosmos