Forum Discussion
ENiKS
8 years agoAdventurer
[Request] Stop sending controller events when app doesn't have Input focus (+ mod how to do it)
With 1.20 Unreal integration and Dash update, controller events still get send even when app doesn't have Input focus. While as a developer i can check on all input events if the app does have input focus and decide to ignore them. I think better solution to stop sending input events from Oculus plugin is much more effective, and I can't think of a use-case where you want input events even when in Dash.
For my fellow developers, if you're looking for a mode to do it, the solution is quite simple:
Modify /Engine/Plugins/Runtime/Oculus/OculusVR/Source/OculusInput/Private/OculusInput.cpp
add somewhere at top
#include "OculusFunctionLibrary.h"
The change line 175 to look like this:
if(IOculusHMDModule::IsAvailable() && ovrp_GetInitialized() && FApp::HasVRFocus() && UOculusFunctionLibrary::HasInputFocus())
Note: This doesn't stop other Input devices such as gamepad, keyboard, gloves etc., so it's not 100% bulletproof. But for Touch-only titles it is.
For my fellow developers, if you're looking for a mode to do it, the solution is quite simple:
Modify /Engine/Plugins/Runtime/Oculus/OculusVR/Source/OculusInput/Private/OculusInput.cpp
add somewhere at top
#include "OculusFunctionLibrary.h"
The change line 175 to look like this:
if(IOculusHMDModule::IsAvailable() && ovrp_GetInitialized() && FApp::HasVRFocus() && UOculusFunctionLibrary::HasInputFocus())
Note: This doesn't stop other Input devices such as gamepad, keyboard, gloves etc., so it's not 100% bulletproof. But for Touch-only titles it is.
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 26 days ago
- 8 months ago
- 4 months ago