Skip to content
Snippets Groups Projects
Commit 2de83ac0 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

refactor(pawn): Starts refactoring of InputMappingContext.

- Removes all specialized IMCs from components
- Adds two main IMCs to Pawn: General and Navigation
- Adds one default for general, one for left and one for right handed navigation
- Can be set in pawn
parent 17a3b823
No related branches found
No related tags found
2 merge requests!80UE5.3-2023.1-rc2,!69refactor(pawn): Condense IMCs
Pipeline #338629 passed
Showing
with 1 addition and 14 deletions
No preview for this file type
File deleted
No preview for this file type
File deleted
File deleted
No preview for this file type
No preview for this file type
File deleted
No preview for this file type
File deleted
No preview for this file type
File deleted
File added
File added
File added
No preview for this file type
No preview for this file type
File deleted
......@@ -2,7 +2,6 @@
#include "CoreMinimal.h"
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
#include "IDisplayCluster.h"
#include "MotionControllerComponent.h"
#include "Camera/CameraComponent.h"
......@@ -165,7 +164,7 @@ void ACAVEOverlayController::BeginPlay()
// Input config
if (URWTHVRUtilities::IsPrimaryNode())
{
if (CycleDoorTypeInputAction == nullptr || IMCCaveOverlayInputMapping == nullptr)
if (CycleDoorTypeInputAction == nullptr)
{
UE_LOGFMT(LogCAVEOverlay, Error, "Input action and mapping not set in CaveOverlayController!");
return;
......@@ -174,15 +173,6 @@ void ACAVEOverlayController::BeginPlay()
UEnhancedInputComponent* Input = Cast<UEnhancedInputComponent>(PC->InputComponent);
Input->BindAction(CycleDoorTypeInputAction, ETriggerEvent::Triggered, this,
&ACAVEOverlayController::CycleDoorType);
if (const ULocalPlayer* LocalPlayer = PC->GetLocalPlayer())
{
if (UEnhancedInputLocalPlayerSubsystem* InputSystem =
LocalPlayer->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())
{
InputSystem->AddMappingContext(IMCCaveOverlayInputMapping, 0);
}
}
}
// Bind the cluster events that manage the door state.
......
......@@ -128,9 +128,6 @@ public:
UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "CAVEOverlay")
UInputAction* CycleDoorTypeInputAction;
UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "CAVEOverlay")
UInputMappingContext* IMCCaveOverlayInputMapping;
UPROPERTY()
UDoorOverlayData* Overlay;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment