My paddle doesn`t move

Hi, Im learning how to use UE to create games (of course). Im trying to follow a YouTube tutorial but something went wrong. The game Im trying to create is Breakout. although I Followed the tutorial to a T (except for the names) the paddle in the tutorial moves and mine doesnt. It`s a C++ tutorial, here is the link for it: Learn Unreal Engine (with C++) - Full Course for Beginners - YouTube

It also gives me the error: Failed to load /Game/Materials/CollisionMaterial.CollisionMaterial Referenced by BodySetup_0 when I open Unreal.

Here is the paddle code in the .cpp file:

// Fill out your copyright notice in the Description page of Project Settings.

include “GayMan.h”//(couldn`t add the hashtags)

include “GameFramework/FloatingPawnMovement.h”

include “Components/StaticMeshComponent.h”

// Sets default values


// 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;
SM_Paddle = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("meeeeeeeeeeeee"));
RootComponent = SM_Paddle;
FloatingMovement = CreateDefaultSubobject<UFloatingPawnMovement>(TEXT("Floating Pawn Movement"));


// Called when the game starts or when spawned

void AGayMan::BeginPlay()



// Called every frame

void AGayMan::Tick(float DeltaTime)



// Called to bind functionality to input

void AGayMan::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)



void AGayMan::MoveHorizontal(float AxisValue)

AddMovementInput(FVector(AxisValue, 0.0f, 0.0f), 1.0f, false);


And here is the code for the player controller in the .cpp file:

// Fill out your copyright notice in the Description page of Project Settings.

include “jojo_for_the_win.h”//(couldn`t add the hashtags)

include “Kismet/GameplayStatics.h”

include “Camera/CameraActor.h”

include “GayMan.h”

//include “ball.h”


//int Score;


void Ajojo_for_the_win::BeginPlay(){

UGameplayStatics::GetAllActorsOfClass(GetWorld(), ACameraActor::StaticClass(), CameraActors);
FViewTargetTransitionParams Params;
SetViewTarget(CameraActors[0], Params);


void Ajojo_for_the_win::SetupInputComponent(){



InputComponent->BindAxis("MoveHorizontal", this, &Ajojo_for_the_win::MoveHorizontal);


void Ajojo_for_the_win::MoveHorizontal(float AxisValue){

auto MyPaddle = Cast<AGayMan>(GetPawn());

if (MyPaddle) {

// rewrite this code so you won`t need to cast it everytime.


thanks for the help.