steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

HTC Vive Controllers not showing in scene

Open larryjohncarter opened this issue 7 years ago • 37 comments

Hello, I am using Unity 2018.3.5f1 with SteamVR latest version from Unity Asset Store which is 2.2.0. I have set up the SteamVR input and everything. However when I go into the Interactions_Example scene provided by SteamVR asset, the controllers are not being tracked. I have tried everything including making a new project. Even when I attach a script to debug buttons, it doesn't show any debug logs.

larryjohncarter avatar Feb 14 '19 10:02 larryjohncarter

Are you getting any errors in the console? You say you did generate actions in the SteamVR input window?

On Thu, Feb 14, 2019 at 2:12 AM larryjohncarter [email protected] wrote:

Hello, I am using Unity 2018.3.5f1 with SteamVR latest version from Unity Asset Store which is 2.2.0. I have set up the SteamVR input and everything. However when I go into the Interactions_Example scene provided by SteamVR asset, the controllers are not being tracked. I have tried everything including making a new project. Even when I attach a script to debug buttons, it doesn't show any debug logs.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steamvr_unity_plugin/issues/323, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMIMJV8irftvhf7t4gt7DdgtHSVDo5Mks5vNTZxgaJpZM4a7QPS .

keithbradner avatar Feb 14 '19 18:02 keithbradner

No errors at all. just doesnt track the controllers

larryjohncarter avatar Feb 14 '19 19:02 larryjohncarter

I have the same problem. The controller model doesn't render and no tracking is occuring. I have set up action in the input. The transform of both controllers stay 0,0,0 but they work in games and are tracking in steam VR. it doesn't work with any unity project even the sample ones. I have no idea where to start to fix this problem.

BennyFab avatar Feb 18 '19 21:02 BennyFab

Neither of you are getting any errors? How about warnings? Can you paste the editor log so I can see the flow of logs?

You can find the editor log here: Hit the windows key then paste in: %LOCALAPPDATA%\Unity\Editor There you'll find Editor.log

You can paste to: https://gist.github.com/

keithbradner avatar Feb 19 '19 04:02 keithbradner

Ok soo... I restarted a completely new project and it finaly Worked (I don’t know why or how and I don’t like that) Here is all that happen and the editor log if it can help someone.

So when installing the plugin I had those warning and messsages:

ImportFBX Warnings: Can't generate normals for blendshape 'Squeeze' on mesh 'finger', mesh has no smoothing groups.

ImportFBX Warnings: Can't generate normals for blendshape 'GD_mesh' on mesh 'GD_mesh.001', mesh has no smoothing groups.Can't generate normals for blendshape 'Key 2' on mesh 'GD_mesh.001', mesh has no smoothing groups.

ImportFBX Warnings: Can't generate normals for blendshape 'puff' on mesh 'Body', mesh has no smoothing groups.

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.

[SteamVR Setup] Generated you an editor app key of: application.generated.unity.vrtest.exe. This lets the editor tell SteamVR what project this is. Has no effect on builds. This can be changed in Assets/SteamVR/Resources/SteamVR_Settings UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_Settings:LoadInstance() (at Assets/SteamVR/Scripts/SteamVR_Settings.cs:80) Valve.VR.SteamVR_Settings:get_instance() (at Assets/SteamVR/Scripts/SteamVR_Settings.cs:17) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:48) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

[SteamVR Setup] Enabled virtual reality support in Player Settings. (you can disable this by unchecking Assets/SteamVR/SteamVR_Settings.autoEnableVR) UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:56) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

[SteamVR Setup] Added OpenVR to supported VR SDKs list. UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:91) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

[SteamVR Setup] Installing OpenVR package... UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:123) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

[SteamVR Setup] Successfully installed OpenVR package. UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_AutoEnableVR:Update() (at Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs:205) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt. UnityEditorInternal.InternalEditorUtility:GetGameObjectInstanceIDFromComponent() UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

There were no warning or error when adding steamVR prefab (camera rig and SteamVR)

But when pressing play I forgot to add an input folder with the necessary files (I clicked yes to create the default one, and clicked generate in the input windows ) so I had those messages:

[SteamVR] Could not find actions file at: C:/Users/fabla/Documents/VR Test/actions.json UnityEngine.Debug:LogError(Object) Valve.VR.SteamVR_Input:IdentifyActionsFile(Boolean) (at Assets/SteamVR/Input/SteamVR_Input.cs:1282) Valve.VR.SteamVR:CreateInstance() (at Assets/SteamVR/Scripts/SteamVR.cs:179) Valve.VR.SteamVR:Initialize(Boolean) (at Assets/SteamVR/Scripts/SteamVR.cs:98) Valve.VR.SteamVR_Behaviour_Pose:OnEnable() (at Assets/SteamVR/Input/SteamVR_Behaviour_Pose.cs:88) [SteamVR] No pose action set for this component UnityEngine.Debug:LogError(Object) Valve.VR.SteamVR_Behaviour_Pose:Start() (at Assets/SteamVR/Input/SteamVR_Behaviour_Pose.cs:76)

GUI Window tried to begin rendering while something else had not finished rendering! Either you have a recursive OnGUI rendering, or the previous OnGUI did not clean up properly.

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/actions.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/bindings_holographic_controller.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/bindings_knuckles.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/bindings_oculus_touch.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/bindings_vive_controller.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/binding_holographic_hmd.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/binding_rift.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/binding_vive.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/binding_vive_pro.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[SteamVR] Copied example input JSON to path: C:/Users/fabla/Documents/VR Test/binding_vive_tracker_camera.json UnityEngine.Debug:Log(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:58) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:293) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:321) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:383) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Assertion failed on expression: 'device.IsInsideFrame()'

It is the same exact thing (I beleive) I did yesterday but now it works. The controller appears and track. One thing I did read was to check the project setting in player to make sure that in the XR setting openVR was first, but it already was so I didn’t change anything there. I must admit I am a bit confused about what happen. Thank you for your help.

https://gist.github.com/BennyFab/59ec77c43079aa3238893f17470abc95 Editor.log

BennyFab avatar Feb 19 '19 22:02 BennyFab

Thanks for the log @BennyFab, yeah I'm not really seeing any issues there. Hard to tell since it's working now. @larryjohncarter can you provide a editor log as well?

keithbradner avatar Feb 19 '19 23:02 keithbradner

Hello. Sorry to interrupt, I may have the similar symptom and having trouble. My version is same as others and when I tried out the quick guide and other tutorials, controller wont work out. It works out fine on other places like SteamVR Home, so i think its not the problem with the machine itself.

i would put the picture of console if this would be of any help,

capture

rinrinrinrinrinrinrin avatar Feb 27 '19 18:02 rinrinrinrinrinrinrin

@rinrinrinrinrinrinrin what version of steamvr are you running?

keithbradner avatar Mar 04 '19 19:03 keithbradner

It Happened again, no error message nothing. I even started a brand new project with only the SteamVR plugin. Editor.log

BennyFab avatar Mar 05 '19 16:03 BennyFab

I also ran into this problem testing SteamVR 2.2 and have a workaround below. I'm surely taking the long way around here to resolve, but hopefully helps @keithbradner find the issue.

Steps to reproduce:

MacOS: 10.14.3 SteamVR Runtime: 1.2.10 (current Steam Release branch) Create New Project in 2018.3.6f (this one is called: Testing) Import SteamVR 2.2.0 Package Accept All SteamVR project settings changes

Copy actions.json from Assets/SteamVR/Input/ExampleJSON to project root (folder that contains Assets, Library etc). Might not be necessary on Windows, but I'm on Mac, see #265

Window -> SteamVR Input Save and generate

Open SteamVR/InteractionSystem/Samples/Interactions_Example scene Run, notice there are no Vive Controllers showing in scene.

Workaround Steps:

Go back to SteamVR Input window Open binding UI

Note, there is no binding set for the Vive Controller. Click Create Binding Click Replace Default Binding Name it and Save Click Back.
The Binding UI now shows that binding as your current binding.

There is now a new file in project root (named after your project name): application_generated_unity_testing_exe_binding_vive_controller.json

open that file in a text editor. Also, open Assets/SteamVR/Input/ExampleJSON/bindings_vive_controller.json in text editor.
replace "bindings": {} block in your generated json with that from the vive controller json (or whatever controller you are using).

Go back to binding UI and it will complain of no bindings. open binding and click replace default binding again and save.

Run scene and enjoy the visible controllers.

working file references:

Here's a gist of my actions.json and application_generated_unity_testing_exe_binding_vive_controller.json files:

https://gist.github.com/smashriot/1251e6db12cefbe7fe793988da14c576

smashriot avatar Mar 05 '19 21:03 smashriot

Tested again this morning with a fresh project. It's the input JSON files, and is easy to fix.

New project in 2018.3.6f, import 2.2.0 Steam VR:

  • Move all JSON files in Assets/SteamVR/Input/ExampleJSON/ to project root.
  • Open SteamVR Input
  • Save and generate
  • Note, controller bindings now show default official vive_controller bindings
  • Run scene and controllers are now visible/usable

smashriot avatar Mar 06 '19 15:03 smashriot

I am having the same trouble described above. Editor.log

It's almost certainly something to do with my actions/bindings/these JSON files but without an error message how could I hope to debug the problem?

When I set the bindings back to the default through what @smashriot said, that solves my problem. So whatever I'm trying to do with my actions is causing the controllers to not appear but also does not display messages/errors.

CurtisRose avatar Mar 07 '19 02:03 CurtisRose

Same problem here, on Mac and Windows. I've been chasing this for about a month now and it's infuriating. No warnings that make any sense. I've chased the problem through the debugger, and I have the same errors that rinrinrinrinrinrinrin's screenshot above shows. According to the debugger, it can't find the actions.json file. The .input part of that class method is null, at that point.

chilton avatar Mar 08 '19 02:03 chilton

For a standalone MacOS build, Unity copies json files to the same folder as the .app.

When running AppName.app, the Unity Player.log shows: [SteamVR] Could not find actions file at: /Users/username/Desktop/Builds/AppName.app/actions.json

To fix, the json files need to be moved inside the root folder of the AppName.app package (right click and Show Package Contents).

smashriot avatar Mar 13 '19 23:03 smashriot

I would recommend testing on windows. @chilton those errors should either indicate an out of date openvr_api.cs or an out of date SteamVR version. It might be worth trying SteamVR Beta as well if neither of those are out of date.

keithbradner avatar Mar 14 '19 15:03 keithbradner

I wanted to add that even with @smashriot solution, this doesn't work for me. My controllers still disappear. Only way to make them show up after trying to modify the inputs in the JSON files is starting over from scratch with a brand new project. Not even deleting Steam VR folder and reimporting it fixed the issue after I tried modifying the inputs.

This makes no sense at all.

brianbatista avatar Mar 15 '19 15:03 brianbatista

On windows 10, Unity 2018.3.9f1 and StreamVR 2.2.0 I can get a glove to show up but not the controller. As soon as the scene loads the controller disappears. Clicking the menu gets it back, but then it goes as soon as the menu unloads.

image

When I test in the simple scene it also does not show up.

EDIT

It only works for me if I never edit the SteamVR Input settings. Once I try to do that, the controllers no longer appear. So the advice in this tutorial article where it talks about defining actions is when the controllers fail. I hope this help reproducing the bug and finding a fix.

iconnor avatar Mar 21 '19 00:03 iconnor

Same problem here on Windows 10, I can confirm that even removing everything related to SteamVR and reimporting it doesn't solve this minor problem of controllers not showing up.

editor.log

jirimotejlek avatar Mar 21 '19 05:03 jirimotejlek

Same issue with Windows 10, Unity 2018.3.9f1 and SteamVR 2.2.0 using Vive Controllers. I tried Smashriot's solutions. Neither worked for me.

I must also add, I started having issues when I renamed default and added a single action, and then set up the binding of the new action to the menu button. I could still use the menu button and it reacts in Unity (opens a simple menu using Unity UI), but tracking does not update, and no models appear. When I hold the bottom Vive menu button, the controllers appear, I can interact with the Vive menu, but exiting that menu, the controllers disappear again.

Seeing how long this issue has persisted, I am really disappointed with the lack of an official solution or update from Steam on this, especially when they recommend developers to abandon the old SteamVR plugin in favor of this version. IT DOESN'T WORK!

I've tried restarting Unity, SteamVR, my machine, and downloading an older version from my repo onto my machine from before I started having the issues. Nothing fixes the issue.

FIXED:

I removed the SteamVR 2.2.0 plugin and imported 1.2.3 and it magically started working again, interaction and visible controllers. Now I will write my own mapping to get the menu to appear (which isn't hard for me to do). My trust with Valve's 'recommendation' is shattered.

apiotuch avatar Mar 25 '19 04:03 apiotuch

I am experiencing the same issue. Does Valve any idea as to what is causing this issue? We can all probably help out if we had some pointers. Also which SteamVR version is considered stable?

JustinBuzon avatar Mar 28 '19 19:03 JustinBuzon