# "decoding the player’s intent” and “implementing the decoded intent"

**URL:** <https://forums.unrealengine.com/t/decoding-the-player-s-intent-and-implementing-the-decoded-intent/2874504>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [November 28, 2026, 7:43pm UTC](https://forums.unrealengine.com/t/decoding-the-player-s-intent-and-implementing-the-decoded-intent/2874504 "2026-11-28T19:43:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ViaCognita](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/viacognita/32/906601_2.png) [@ViaCognita](https://forums.unrealengine.com/u/ViaCognita)\
**Post date:** [November 28, 2026, 7:43pm UTC](https://forums.unrealengine.com/t/decoding-the-player-s-intent-and-implementing-the-decoded-intent/2874504/1 "2026-11-28T19:43:11Z")

</div>

Hi!

Reading this post, that I asked, [Where to process an Input Action](https://forums.unrealengine.com/t/where-to-process-an-input-action/1235996)

I have implemented the following in a PlayerController:

Header.

```cpp
#pragma once

 "CoreMinimal.h"
 "GameFramework/PlayerController.h"
 "SNPlayerController.generated.h"

struct FInputActionValue;
class UInputAction;
class UInputMappingContext;

/**
*
*/
UCLASS()
class MYGAME_API ASNPlayerController : public APlayerController
{
GENERATED_BODY()

public:

UPROPERTY(EditAnywhere, Category = "Input")
UInputMappingContext* DefaultInputMapping;

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
UInputAction* ShootAction;

protected:

virtual void BeginPlay() override;

virtual void SetupInputComponent() override;

};

```

CPP.

```cpp
 "SNPlayerController.h"
 "EnhancedInputComponent.h"
 "EnhancedInputSubsystems.h"
 "SNPlayerCharacter.h"

void ASNPlayerController::BeginPlay()
{
Super::BeginPlay();

if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer()))
{
	Subsystem->ClearAllMappings();
	Subsystem->AddMappingContext(DefaultInputMapping, 0);
}

}

void ASNPlayerController::SetupInputComponent()
{
Super::SetupInputComponent();

UEnhancedInputComponent* Input = Cast<UEnhancedInputComponent>(InputComponent);
ASNPlayerCharacter* PlayerCharacter = Cast<ASNPlayerCharacter>(GetPawn());

Input->BindAction(ShootAction, ETriggerEvent::Started, PlayerCharacter, &ASNPlayerCharacter::Shoot);

}

```

I’m calling a method from the Player’s Character class from the Player Controller.

Is this the idea behind _“decoding the player’s intent” should be in the player controller, and “implementing the decoded intent” should be in the character / pawn_?

Maybe, I can create a _shoot_ method in the Player Controller class, and call the `ASNPlayerCharacter::Shoot on it.`

Or maybe, I can bind the actions in the PlayerCharacter class.

Or I’m getting totally mixed up.

Thanks!
