Why are my controllers not registering any inputs after connecting to a room?
Options
I have been encountering a game-breaking bug(?) that has to do with Unity and Photon.
When I am using Unity without connecting to a room, and trying to use the controllers, when pressing the trigger button, everything registers normally and correctly. Ok so here comes the problem:
When I am connecting to a room, I'm now getting issues with the controllers no longer responding. E.g. pressing any button does not register, at all. No button press registers except for pressing the "menu" button to bring up the SteamVR overlay. Okey so this is an issue, however:
When I EXIT play-mode and then enter it again, this time without trying to connect to a Room or anything, the controllers no longer register any inputs. It's like the controllers have stopped working completely. Now this is weird, controllers first working fine, then stop working as soon as I've entered a room and still not working even after exiting the room and restarting play-mode. So what's the catch?
The tracking is working normally. I can even track my player over the network and it updates correctly on the second client. But anything that has to do with pressing buttons or even using the touch controls stops working as soon as I connect to Photon, and they stay that way, e.g. I can no longer register any inputs in an update loop or anywhere else. Before connecting to a room and after connecting to a room.
I am not sure what is going on. I am not getting any error messages. And when I'm putting breakpoints in my code inside of Visual Studio, the unity never stops or, the console never register any debug.logs from buttons that are being pressed down when I have connected only once in this entire session to a Photon room.
Has anyone here ever experienced anything similar? Buttons suddenly stop registering inputs until you restart everything? I had to restart my PC for the controllers to work normally again. I have not tried any other troubleshooting step but any and all help would be appreciated!
When I am using Unity without connecting to a room, and trying to use the controllers, when pressing the trigger button, everything registers normally and correctly. Ok so here comes the problem:
When I am connecting to a room, I'm now getting issues with the controllers no longer responding. E.g. pressing any button does not register, at all. No button press registers except for pressing the "menu" button to bring up the SteamVR overlay. Okey so this is an issue, however:
When I EXIT play-mode and then enter it again, this time without trying to connect to a Room or anything, the controllers no longer register any inputs. It's like the controllers have stopped working completely. Now this is weird, controllers first working fine, then stop working as soon as I've entered a room and still not working even after exiting the room and restarting play-mode. So what's the catch?
The tracking is working normally. I can even track my player over the network and it updates correctly on the second client. But anything that has to do with pressing buttons or even using the touch controls stops working as soon as I connect to Photon, and they stay that way, e.g. I can no longer register any inputs in an update loop or anywhere else. Before connecting to a room and after connecting to a room.
I am not sure what is going on. I am not getting any error messages. And when I'm putting breakpoints in my code inside of Visual Studio, the unity never stops or, the console never register any debug.logs from buttons that are being pressed down when I have connected only once in this entire session to a Photon room.
Has anyone here ever experienced anything similar? Buttons suddenly stop registering inputs until you restart everything? I had to restart my PC for the controllers to work normally again. I have not tried any other troubleshooting step but any and all help would be appreciated!
0
Best Answers
-
The buttons and triggers on VR controller usually working with some kind of manager script (OVRManager in case of Oculus) that should be on the scene, otherwise they could require alternative way of registering any activity (again, in case of Oculus you should call OVRInput.Update() and OVRInput.FixedUpdate() in corresponding methods). So the lack of information in your post gives me only chance to assume that something happens when client joining the room (scene loaded/reloaded? objecs destroyed?) that prevents your scripts from detecting the input.
You found the point where problem begins - so dig it down, nobody have more of info about your problem than you do.
Otherwise, you can provide more info with screenshots and maybe video, so the problem could be recognized and eliminated by collective brainstorm5 -
I just now found the problem. SteamVR was taking control of my inputs and Unity was no longer registering inputs from the input manager. I have changed my code now to take inputs from SteamVR instead.0
Answers
-
The buttons and triggers on VR controller usually working with some kind of manager script (OVRManager in case of Oculus) that should be on the scene, otherwise they could require alternative way of registering any activity (again, in case of Oculus you should call OVRInput.Update() and OVRInput.FixedUpdate() in corresponding methods). So the lack of information in your post gives me only chance to assume that something happens when client joining the room (scene loaded/reloaded? objecs destroyed?) that prevents your scripts from detecting the input.
You found the point where problem begins - so dig it down, nobody have more of info about your problem than you do.
Otherwise, you can provide more info with screenshots and maybe video, so the problem could be recognized and eliminated by collective brainstorm5 -
I just now found the problem. SteamVR was taking control of my inputs and Unity was no longer registering inputs from the input manager. I have changed my code now to take inputs from SteamVR instead.0