Character is not moving

I made a c++ class inherited from Character class and added a static mesh, which I attached to the root component. I adjusted the input and made the MoveForward function similar to what I saw in the Intro to Programming tutorial. I created a blueprint of that class, added a camera actor and made it the main camera view. I set this blueprint as the default pawn like the tutorial. The thing is that the character is not moving when I press w or s, but I know that the input is working because I printed a message inside of the MoveForward function, before the AddMovementInput function.
Does anyone know what I’m missing?
Thanks.

Hello, RafaZ

First, make sure that in GameMode class that you’re using your Character blueprint is selected as DefaultPawnClass. For this you can create a Blueprint, derived from GameMode class. After that, double click on the blueprint in ContentBrowser and select the Blueprint of your Character in Classes section of Details window (located at top right corner of the screen by default).

After that check if you’ve selected your GameMode blueprint as default GameMode class (go to Edit → ProjectSettings → Maps&Modes → DefaultGameMode).

The code for your character will look something like this:

//appropriate includes here

AMyCharacter::AMyCharacter()
{
	// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	// Create a dummy root component we can attach things to.
	RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent"));
	// Create a camera and a visible object
	UCameraComponent* OurCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("OurCamera"));
	OurVisibleComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("OurVisibleComponent"));
	// Attach our camera and visible object to our root component. Offset and rotate the camera.
	OurCamera->AttachTo(RootComponent);
	//OurCamera->SetRelativeLocation(FVector(-250.0f, 0.0f, 250.0f));
	//OurCamera->SetRelativeRotation(FRotator(-45.0f, 0.0f, 0.0f));
	OurVisibleComponent->AttachTo(RootComponent);
}
// Called when the game starts or when spawned
void AMyCharacter::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void AMyCharacter::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

	// Handle movement based on our "MoveX" and "MoveY" axes
	{
		if (!CurrentVelocity.IsZero())
		{
			FVector NewLocation = GetActorLocation() + (CurrentVelocity * DeltaTime);
			SetActorLocation(NewLocation);
		}
	}

}

// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
	Super::SetupPlayerInputComponent(InputComponent);
	// Respond every frame to the values of our two movement axes, "MoveX" and "MoveY".
	InputComponent->BindAxis("MoveX", this, &AMyCharacter::Move_XAxis);
	InputComponent->BindAxis("MoveY", this, &AMyCharacter::Move_YAxis);
}

void AMyCharacter::Move_XAxis(float AxisValue)
{
	// Move at 100 units per second forward or backward
	CurrentVelocity.X = FMath::Clamp(AxisValue, -1.0f, 1.0f) * 100.0f;
}

void AMyCharacter::Move_YAxis(float AxisValue)
{
	// Move at 100 units per second right or left
	CurrentVelocity.Y = FMath::Clamp(AxisValue, -1.0f, 1.0f) * 100.0f;
}

It worked. Thanks for the help.