04-26-2016 01:46 AM
05-06-2016 04:40 PM
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!
bool FOculusInput::bRemoteKeysMappedToGamepad = true;
/** Are Remote keys mapped to gamepad or not. */
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();
}
05-06-2016 04:45 PM
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;
/** 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();
}
05-09-2016 06:52 AM
[OculusRemote.Settings]
bRemoteKeysMappedToGamepad=False
05-11-2016 10:02 AM