Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
abelmou's avatar
abelmou
Honored Guest
9 years ago

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

4 Replies

Replies have been turned off for this discussion
  • cc'd from https://answers.unrealengine.com/questions/411034/oculus-remote-enter-no-responsehow-can-i-make-it-e.html#answer-416174


    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();
    }
  • 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();
        }





  • 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

  • Just tried this out in 4.11.2 - works beautifully! Thanks Dave!