cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Remote Enter no response,How can I make it effective.

abelmou
Level 2
1ca9sqbk15ud.png
4 REPLIES 4

leftbigtoe
Level 4

cc'd from https://answers.unrealengine.com/questions/411034/oculus-remote-enter-no-responsehow-can-i-make-it-e...


Found a partial workaround: the up down left right on the Oculus Remote triggers the corresponding Gamepad D-Pad events. Haven't found anything corresponding to the enter, back or home key.

UDATE: also found the keys for home & back button in the OculusInputStat.h

         Buttons[(int32)EOculusRemoteControllerButton::DPad_Up].Key = FGamepadKeyNames::DPadUp;
Buttons[(int32)EOculusRemoteControllerButton::DPad_Down].Key = FGamepadKeyNames::DPadDown;
Buttons[(int32)EOculusRemoteControllerButton::DPad_Left].Key = FGamepadKeyNames::DPadLeft;
Buttons[(int32)EOculusRemoteControllerButton::DPad_Right].Key = FGamepadKeyNames::DPadRight;
Buttons[(int32)EOculusRemoteControllerButton::Enter].Key = FGamepadKeyNames::SpecialRight;
Buttons[(int32)EOculusRemoteControllerButton::Back].Key = FGamepadKeyNames::SpecialLeft;

So I found out what happens: In the OculusInput.cpp there is a bool flag hardcoded to TRUE that decides whether the remote buttons are mapped to the gamepad or not. Tried flipping the flag and got compile errors so I'm rolling with the gamepad buttons for now. Hope that helps!

 /** Are Remote keys mapped to gamepad or not. */
bool FOculusInput::bRemoteKeysMappedToGamepad = true;

FOculusInput::FOculusInput( const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler )
: MessageHandler( InMessageHandler )
, ControllerPairs()
{
PreInit(); // @TODO: call it sooner to avoid 'Warning InputKey Event specifies invalid' when loading a map using the custom keys

// take care of backward compatibility of Remote with Gamepad
if (bRemoteKeysMappedToGamepad)
{
Remote.ReinitButtonsForGamepadCompat();
}

leftbigtoe
Level 4
Found a partial workaround: the up down left right on the Oculus Remote triggers the corresponding Gamepad D-Pad events. Haven't found anything corresponding to the enter, back or home key.

UDATE: also found the keys for home & back button in the OculusInputStat.h

    		Buttons[(int32)EOculusRemoteControllerButton::DPad_Up].Key = FGamepadKeyNames::DPadUp;
    Buttons[(int32)EOculusRemoteControllerButton::DPad_Down].Key = FGamepadKeyNames::DPadDown;
    Buttons[(int32)EOculusRemoteControllerButton::DPad_Left].Key = FGamepadKeyNames::DPadLeft;
    Buttons[(int32)EOculusRemoteControllerButton::DPad_Right].Key = FGamepadKeyNames::DPadRight;
    Buttons[(int32)EOculusRemoteControllerButton::Enter].Key = FGamepadKeyNames::SpecialRight;
    Buttons[(int32)EOculusRemoteControllerButton::Back].Key = FGamepadKeyNames::SpecialLeft;

So I found out what happens: In the OculusInput.cpp there is a bool flag hardcoded to TRUE  that decides whether the remote buttons are mapped to the gamepad or not. Tried flipping the flag and got compile errors so I'm rolling with the gamepad buttons for now. Hope that helps!

    /** Are Remote keys mapped to gamepad or not. */
    bool FOculusInput::bRemoteKeysMappedToGamepad = true;
    
    FOculusInput::FOculusInput( const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler )
    : MessageHandler( InMessageHandler )
    , ControllerPairs()
    {
    PreInit(); // @TODO: call it sooner to avoid 'Warning InputKey Event specifies invalid' when loading a map using the custom keys
    
    // take care of backward compatibility of Remote with Gamepad 
    if (bRemoteKeysMappedToGamepad)
    {
    Remote.ReinitButtonsForGamepadCompat();
    }





Gnometech
Level 4
As you guys noticed, by default the Oculus remote is set to mirror gamepad buttons.  From the comments it sounds like this was so some older apps would just work with the remote without needing to build new input mappings.  If you want to use the real Oculus remote input mappings, open your project's DefaultEngine.ini and add the following:

[OculusRemote.Settings]
bRemoteKeysMappedToGamepad=False

From now on the Oculus remote should correctly map to the Oculus remote inputs in UE4.  No source changes required.

- Dave

David Wyand www.gnometech.com @Gnometech Game in progress: The Field -- Multiplayer, battlefield-style VR FPS GearVR Store: Circumpaint -- Paint and animate on a dome around you

Alexotronic
Level 3
Just tried this out in 4.11.2 - works beautifully! Thanks Dave!