InteractorHand

InteractorHand

#Overview

name: InteractorHand

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 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of InteractorHand is to determine which hand should have the primary interactor laser in the VR Editor mode of Unreal Engine 5. This setting is used to configure the user’s preferred hand for interaction in the VR editing environment.

This setting variable is primarily used by the VR Editor subsystem of Unreal Engine 5. Specifically, it is referenced in the VREditorUISystem module, which is responsible for managing the user interface in VR editing mode.

The value of this variable is set in the UVRModeSettings class, which is likely configured through the editor’s project settings or a configuration file. It is defined as an UPROPERTY with the EditAnywhere and config specifiers, allowing it to be edited in the editor and saved to configuration files.

InteractorHand interacts with other variables and systems related to VR editing, particularly those involving hand interactors and UI elements. It’s used to determine which hand (left or right) should be assigned the laser interactor and which should be the UI interactor.

Developers must be aware that this variable affects the asymmetry of interaction in the VR editor. Changing this setting will swap the roles of the left and right hand controllers, which can significantly impact the user experience and workflow in VR editing mode.

Best practices when using this variable include:

  1. Ensuring that the setting is easily accessible for users to change based on their preference.
  2. Considering the implications of this setting when designing VR editor interactions and UI layouts.
  3. Testing the VR editor thoroughly with both left and right hand configurations to ensure a consistent experience.
  4. Providing clear documentation or in-editor guidance on how this setting affects the VR editing experience.
  5. Considering offering an option to mirror or adapt UI elements based on this setting to maintain a comfortable layout for both left and right-handed users.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:53, section: [/Script/VREditor.VRModeSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/VREditor/Private/UI/VREditorUISystem.cpp:194

Scope (from outer to inner):

file
function     void UVREditorUISystem::UpdateInteractors

Source code excerpt:

{
	// TODO: asymmetry hardcoded right now
	if (GetDefault<UVRModeSettings>()->InteractorHand == EInteractorHand::Left)
	{
		LaserInteractor = Cast<UVREditorInteractor>( GetOwner().GetHandInteractor( EControllerHand::Left ) );
		UIInteractor = Cast<UVREditorInteractor>( GetOwner().GetHandInteractor( EControllerHand::Right ) );
	}
	else
	{

#Loc: <Workspace>/Engine/Source/Editor/VREditor/Private/UI/VREditorUISystem.cpp:2139

Scope (from outer to inner):

file
function     void UVREditorUISystem::UpdateDetachedActorPreviewUI

Source code excerpt:

		Translation.Y += Index;
		NewTransform.SetTranslation(Translation);
		if (GetDefault<UVRModeSettings>()->InteractorHand == EInteractorHand::Left)
		{
			NewTransform.Mirror(EAxis::Y, EAxis::Y);
		}
		NewTransform *= FTransform(RoomSpaceHeadYawRotator.Quaternion(), FVector::ZeroVector);
		PreviewPanel->SetLocalRotation(NewTransform.GetRotation().Rotator());
		PreviewPanel->SetRelativeOffset(RoomSpaceHeadLocation + NewTransform.GetTranslation());

#Loc: <Workspace>/Engine/Source/Editor/VREditor/Public/VRModeSettings.h:47

Scope (from outer to inner):

file
class        class UVRModeSettings : public UVISettings

Source code excerpt:

	// Which hand should have the primary interactor laser on it
	UPROPERTY(EditAnywhere, config, Category = "General")
	EInteractorHand InteractorHand;

	/** Show the movement grid for orientation while moving through the world */
	UPROPERTY(EditAnywhere, config, Category = "World Movement")
	uint32 bShowWorldMovementGrid : 1;

	/** Dim the surroundings while moving through the world */