void AMainPlayer::MoveForward(float Value)
{
const FRotator Rotation = Controller->GetcontrolRotation();
const FRotator YawRotation(0.0f,Rotation.Yaw, 0.0f);
const FVector Direction=FRotationMatrix(YawRotation).GetUnitAxis(EAxis: :X),
AddMovementInput(Direction,Value);
}
void AMainPlayer::MoveRight(float Value)
{
const FRotator Rotation = Controller->GetcontrolRotation():const FRotator YawRotation(0.0f,Rotation.Yaw,0.0f);const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y),
AddMovementInput(Direction,Value);
}