Jump to content

Problem with Controller Trackpad. Need some help


Recommended Posts

Thank you :D And I'll definitely keep you informed.


Something that I forgot to mention in my last post that you may find interesting as well, is that I remembered there's a button on the actual HMD that has the exact same function as the system button on the controllers where you tap it to open the overlay, and hold it to open the power off menu on the overlay. What I realised might help is if I keep tapping that button over and over again while wearing the headset to open and close the overlay for a good amount of time, I can see if I'm having the same problem as the controllers, which could help isolate the issue. Just before I  made my last post here, I tried it, and while I'm not 100% sure, I don't think it had the issue, which I found quite strange.

Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 60
  • Created
  • Last Reply

Hi ,  

Did you find a solution to the problem?

I'm having exactly the same issue with my Vive wands.

I'm mostly playing Serious Sam VR with full locomotion and it happens randomly on both controllers.

I had forward movement stuck and worst of all smooth turning. At the speeds Serious Sam is played, uncontrolled smooth rotation is really awful. 


Link to comment
Share on other sites

  • 2 weeks later...

I have been making a game with Unity and SteamVR for about 9-10 months now. This problem is utterly frustrating and I can agree it has to go away! I have tried tracking it into the code of SteamVR and OpenVR. I can confirm you aren't the only one with the issue. I searched for days thinking I was crazy and the only one with the issue.


In the code of steamVR, the GetPress() function returns true when no press is there but it is very rare, also the GetAxis() returns a vector2 of not (0, 0). I believe and I am not sure about this, if you quickly move your thumb across the touchpad, somewhat diagonally, at some point the problem occurs. It will keep the controller on too because it assumes you are still touching it. I thought it was the controller, marked it, and later realized from testing that is wrong, it happens with either controllers. I am not using direct mode and I am creating my game on a laptop. The hdmi connection is intel HD 4000, something like that. However my graphics card nvidia 1050ti is being used and this makes it possible to use my Vive, of course not the Oculus, another story.


Anyway, there is slight lag from time to time and I try to keep my game at 90fps. I have noticed sometimes a lock at 30fps and I was wondering if this slight lag, when it happens, might be ignoring the paduntouched event (Therefore assuming it stays as touched). I also know the controllers are latest firmware and I use software called Deep Freeze, so basically this install is fresh as possible and won't change at all. This is why I dug into the code and I believe that is where exactly the problem lies.


In SteamVR_TrackedController.cs


Line 226

pad = controllerState.ulButtonTouched & (1UL << ((int)EVRButtonId.k_EButton_SteamVR_Touchpad));


Debug log shows:

pad = 4294967296 and padtouched = true


this is while I was not touching the controller but it assumed I was. Another strange thing that made me crazy was at some point even if I used Debug.Log("HI"); the pad would return 0 and padtouched = false. Everytime I removed the Debug, it would re-create the touching problem. I was flipping out for sure and thought this is definitely a timing issue? Any other thoughts? I would love to create a bug free game and this one plus the random 30 fps lock is driving me up a wall.



Link to comment
Share on other sites

Line 134:

if (system != null && system.GetControllerState(controllerIndex, ref controllerState, (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t))))


this is where controllerState is passed and changed, it's a ref. But the further I followed it, I got a little confused. Goes into openvr_api.cs:


public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
GetControllerStateUnion u;
VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
u.pGetControllerStatePacked = null;
u.pGetControllerState = FnTable.GetControllerState;
bool packed_result = u.pGetControllerStatePacked(unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)));

state_packed.Unpack(ref pControllerState);
return packed_result;
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
return result;

Link to comment
Share on other sites


If you're using Deep Freeze, then you might not have the latest SteamVR version. Can you confirm you are on the LATEST SteamVR release? If so, can you also test on the LATEST SteamVR beta release and tell me if you can reproduce the problem?

Thank you,

-John C

Link to comment
Share on other sites

SteamVR Built Feb 9, 2018 at 17:42 Version 1518226924

The setting in Steam shows update to latest when it comes out.


I also turn off Deep Freeze to update Unity and Steam things when they come up.

So I opt to SteamVR Beta, I guess that is what I had to do, SteamVR downloaded in Steam. I suppose that is what I had to do?


Now it shows SteamVR [beta] and SteamVR beta when launched SteamVR. Ok testing...


Yeap two minutes later, I can generate it. You have to be bouncing your thumb a lot. I try a combination of slow touches while dragging my thumb off the touchpad. Maybe a two touch somewhere creates it? A thumb could potientially touch twice? But I do know if you do ANYTHING else it clears it. So pulling the trigger stops the bug, touching, pressing etc. If you do nothing, the controller stays on and restarting the scene allows the functionality to remain as if I am still touching the pad when I am not.


Built Mar 7, 2018 at 16:43 Version 1520469824


If I can suppose, maybe this is very rare for people to find. Maybe it has to be done in a similar setup where the event is lagged out? I don't see how so few people in the world can experience this issue and when I dig deep into the code, the function is returning true on touch, and a vector 2 position not (0, 0). Meaning it is missing that event of untouch.


Link to comment
Share on other sites

It is possible the event of gettouch down could be skipped too however a person might not notice it. Because they will just simply re-touch the trackpad. I guess I could try to see if that is happening but that is hard to say if it is ever happening.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...