Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ENiKS's avatar
ENiKS
Adventurer
8 years ago

[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.




Replies have been turned off for this discussion