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
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!
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:
- Bind the delegate in the
BeginPlay()
event handler, not in the constructor (check out the screenshot below for the reason), and ensure it’s notNULL
or you’ll get crashes:
void ARollaBallPlayer::BeginPlay()
{
Super::BeginPlay();
MoveForce *= Mesh->GetMass();
JumpImpulse *= Mesh->GetMass();
if (Mesh)
{
Mesh->OnComponentHit.AddDynamic(this, &ARollaBallPlayer::OnHit);
}
}
- Remember to annotate the
OnHit
member function with theUFUNCTION
macro, as this makes it visible to the Engine:
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit );
- Finally, I also had to re-parent the Blueprint, just like it was explained in the video.
Comment from under the video on YT:
First of all, thank you for this tutorial
!. 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 !
Thanks for doing this!
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!
Solved this by using Visual Studio to build the solution and relaunch the editor. The Unreal launcher was opening Unreal with broken blueprints.