Skip to main content
New Participant
April 26, 2016

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

    This topic has been closed for replies.

    4 replies

    Up and Coming
    May 6, 2016

    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();
    }
    Up and Coming
    May 6, 2016
    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();
        }





    Up and Coming
    May 9, 2016
    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
    Up and Coming
    May 11, 2016
    Just tried this out in 4.11.2 - works beautifully! Thanks Dave!