# COMMENT CREER UN MENU D'ACCUEL AVEC UNREAL 5.4

**URL:** <https://forums.unrealengine.com/t/comment-creer-un-menu-daccuel-avec-unreal-5-4/2185852>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [December 8, 2024, 10:01pm UTC](https://forums.unrealengine.com/t/comment-creer-un-menu-daccuel-avec-unreal-5-4/2185852 "2024-12-08T22:01:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Le\_NaMiKaZe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Le\_NaMiKaZe](https://forums.unrealengine.com/u/Le_NaMiKaZe)\
**Post date:** [December 8, 2024, 10:01pm UTC](https://forums.unrealengine.com/t/comment-creer-un-menu-daccuel-avec-unreal-5-4/2185852/1 "2024-12-08T22:01:55Z")

</div>

#include “MyCharacter.h”

AMyCharacter::AMyCharacter()  
{  
PrimaryActorTick.bCanEverTick = true;  
}

void AMyCharacter::BeginPlay()  
{  
Super::BeginPlay();  
}

void AMyCharacter::Tick(float DeltaTime)  
{  
Super::Tick(DeltaTime);  
}

void AMyCharacter::SetupPlayerInputComponent(UInputComponent\* PlayerInputComponent)  
{  
Super::SetupPlayerInputComponent(PlayerInputComponent);

```
PlayerInputComponent->BindAxis("MoveForward", this, &AMyCharacter::MoveForward);
PlayerInputComponent->BindAxis("MoveRight", this, &AMyCharacter::MoveRight);

```

}

void AMyCharacter::MoveForward(float Value)  
{  
if ((Controller != nullptr) && (Value != 0.0f))  
{  
const FRotator Rotation = Controller-\>GetControlRotation();  
const FRotator YawRotation(0, Rotation.Yaw, 0);

```
    const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
    AddMovementInput(Direction, Value);
}

```

}

void AMyCharacter::MoveRight(float Value)  
{  
if ( (Controller != nullptr) && (Value != 0.0f) )  
{  
const FRotator Rotation = Controller-\>GetControlRotation();  
const FRotator YawRotation(0, Rotation.Yaw, 0);

```
    const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
    AddMovementInput(Direction, Value);
}

```

}
