Community Tutorial: Beginners Intro to UE5 - Create a Game in 3 Hours in Unreal Engine 5

Make your first small game using UE5 C++.

https://dev.epicgames.com/community/learning/tutorials/OR8/beginners-intro-to-ue5-create-a-game-in-3-hours-in-unreal-engine-5

1 Like

i have a very silly problem, but when i create my first asset class, and open the content folder, i dont have the SLN file.

I have the same problem as CimetovSan. When a new project is created i don’t have the .sln file in the folder of the project

Thanks a lot for your videos!

(UE 5.3)

Writing the following function in the header file (.h) with the UFUNCTION macro:

UFUNCTION()
virtual void NotifyHit(UPrimitiveComponent* MyComp, AActor* Other, UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult& Hit) override;

and adding the definition in .cpp file as:

void AMyPlayer::NotifyHit(UPrimitiveComponent* MyComp, AActor* Other, UPrimitiveComponent* OtherComp, const bool bSelfMoved, const FVector HitLocation, const FVector HitNormal, const FVector NormalImpulse, const FHitResult& Hit)
{
	if (HitNormal.Z > 0)
		JumpCount = 0;
}

instantly solved the issue for me where the instructor had around 1:20:00. no need to bind the Mesh->OnComponentHit as well.

Great tutorial btw!

1 Like

Have you found a solution or work around for this? I’m having the same issue.

For those still struggling with delegate binding, here’s the approach that worked for me:

  1. Bind the delegate in the BeginPlay() event handler, not in the constructor (check out the screenshot below for the reason), and ensure it’s not NULL or you’ll get crashes:
void ARollaBallPlayer::BeginPlay()
{
	Super::BeginPlay();
	MoveForce *= Mesh->GetMass();
	JumpImpulse *= Mesh->GetMass();
	
	if (Mesh)
	{
		Mesh->OnComponentHit.AddDynamic(this, &ARollaBallPlayer::OnHit);
	}
}
  1. Remember to annotate the OnHit member function with the UFUNCTION macro, as this makes it visible to the Engine:
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit );
  1. Finally, I also had to re-parent the Blueprint, just like it was explained in the video.

Comment from under the video on YT:

1 Like

First of all, thank you for this tutorial :tada: :tada: :tada:!. I used the Enhanced Input System when I followed this tutorial. In Unreal Editor, I saw in the ProjectSettings->Input section that “Axis and Action mappings are now deprecated, please use Enhanced Input Actions and Input Mapping Contexts instead.”

I uploaded the finished project to GitHub. If you struggle somewhere in this tutorial, you can clone the finished version of this tutorial :+1:!

GitHub Link

1 Like

Thanks for doing this!

1 Like

Hello!

I’m having an issue with the Widget creation part of this tutorial. When attempting to set a text component as a variable (just by ticking the checkbox) in a Widget blueprint, Unreal crashes to desktop, with an error log similar to this issue.

I’ve tried deleting the Widget blueprint as well as the C++ class it’s derived from, creating a dummy blueprint without a custom parent class, closed and opened the editor, compiled, and a bunch of other solutions. I just can’t seem to get it to work in this project (although it seems to be working fine in another project).

Could anyone please help me troubleshoot this issue?

Thanks!