bAllowRemoteRotation

bAllowRemoteRotation

#Overview

name: bAllowRemoteRotation

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bAllowRemoteRotation is to control whether the Siri Remote for Apple TV can be rotated to landscape view in the game. This setting is specifically related to the input system for iOS and tvOS platforms.

This setting variable is primarily used in the iOS input subsystem of Unreal Engine, specifically within the FIOSInputInterface class. It’s part of the ApplicationCore module and the IOSRuntimeSettings.

The value of this variable is set in two places:

  1. In the FIOSInputInterface constructor, it’s initially set to false.
  2. Its value is then read from the game’s configuration file (GEngineIni) using the IOSRuntimeSettings section.

This variable interacts with other iOS-specific input settings, such as bGameSupportsMultipleActiveControllers and bAllowControllers. These settings collectively define the input behavior for iOS and tvOS devices.

Developers must be aware that this setting is specific to Apple TV and the Siri Remote. It won’t have any effect on other platforms or input devices. Also, enabling this feature might require additional considerations in the game’s UI and control schemes to properly support landscape orientation of the remote.

Best practices when using this variable include:

  1. Ensure that the game’s UI and controls are designed to work well in both portrait and landscape orientations if this feature is enabled.
  2. Test the game thoroughly with the Siri Remote in both orientations to ensure a smooth user experience.
  3. Consider the implications on multiplayer games, especially if bGameSupportsMultipleActiveControllers is also enabled.
  4. Document the supported remote orientations clearly in the game’s user guide or tutorial.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2989, section: [/Script/IOSRuntimeSettings.IOSRuntimeSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSInputInterface.cpp:99

Scope (from outer to inner):

file
function     FIOSInputInterface::FIOSInputInterface

Source code excerpt:

FIOSInputInterface::FIOSInputInterface( const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler )
	: FAppleControllerInterface( InMessageHandler )
	, bAllowRemoteRotation(false)
	, bGameSupportsMultipleActiveControllers(false)
    , LastHapticValue(0.0f)
    , MouseDeltaX(0)
    , MouseDeltaY(0)
    , ScrollDeltaY(0)
    , bHaveMouse(false)

#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSInputInterface.cpp:117

Scope (from outer to inner):

file
function     FIOSInputInterface::FIOSInputInterface

Source code excerpt:

    
    GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bGameSupportsMultipleActiveControllers"), bGameSupportsMultipleActiveControllers, GEngineIni);
    GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bAllowRemoteRotation"), bAllowRemoteRotation, GEngineIni);
    GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bAllowControllers"), bAllowControllers, GEngineIni);
    GConfig->GetBool(TEXT("/Script/IOSRuntimeSettings.IOSRuntimeSettings"), TEXT("bControllersBlockDeviceFeedback"), bControllersBlockDeviceFeedback, GEngineIni);
    
    
    NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter];
    NSOperationQueue* currentQueue = [NSOperationQueue currentQueue];

#Loc: <Workspace>/Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSInputInterface.h:136

Scope (from outer to inner):

file
class        class FIOSInputInterface : public FAppleControllerInterface, FSelfRegisteringExec

Source code excerpt:

	
	// can the remote be rotated to landscape
	bool bAllowRemoteRotation;

	// can the game handle multiple gamepads at the same time (siri remote is a gamepad) ?
	bool bGameSupportsMultipleActiveControllers;

	// bluetooth connected controllers will block force feedback.
	bool bControllersBlockDeviceFeedback;

#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:348

Scope (from outer to inner):

file
class        class UIOSRuntimeSettings : public UObject

Source code excerpt:

	// If checked, the Siri Remote can be rotated to landscape view
	UPROPERTY(GlobalConfig, EditAnywhere, Category = Input, meta = (DisplayName = "Allow AppleTV Remote landscape mode"))
	bool bAllowRemoteRotation;
		
	// If checked, Bluetooth connected controllers will send input
	UPROPERTY(GlobalConfig, EditAnywhere, Category = Input, meta = (DisplayName = "Allow MFi (Bluetooth) controllers"))
	bool bAllowControllers;

	// Block force feedback on the device when controllers are attached.

#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Private/IOSRuntimeSettings.cpp:53

Scope (from outer to inner):

file
function     UIOSRuntimeSettings::UIOSRuntimeSettings

Source code excerpt:

	AdditionalShippingLinkerFlags = TEXT("");
    bGameSupportsMultipleActiveControllers = false;
	bAllowRemoteRotation = true;
	bDisableMotionData = false;
    bEnableRemoteNotificationsSupport = false;
    bEnableBackgroundFetch = false;
	bSupportsMetal = true;
	bSupportsMetalMRT = false;
    bSupportHighRefreshRates = false;