This is the beginning of my Unreal Engine journey. I’m starting with the latest engine (at the time of writing, v5.1)as it seems so robust and I’d like to work in this environment moreover Unity.
To begin I followed Unreal Sensei‘s “How to Create a Game in Unreal Engine 5 – UE5 Beginner Tutorial” and using the First Person Template in Unreal to get a feel for blueprints and understand basic functionality.
I ended with this final product:
First off was setting up the targets to detect collision, then be affected by physics. i.e impacted by the ball.
The Target Blueprint
The left image shows the detection of the impact, on its collision with something else, it checks if it was hit by a projectile through a cast, it then checks if it has been hit before (this is for the counting mechanic of keeping score) and sets it ‘IsHit” Boolean, it then finds the current game mode and activates the ‘Add Score’ function.
The right shows the simulation of physics only once the target has been hit. It grabs the normal vector from the ‘hit’ information and applies it to the object multiplied by an amount set in the details panel of the target object.
Game Mode Blueprint
The Game Mode BP contained the functionality of game start/setup functions, scoring, the timer & what happens at the end of the game. This BP is like the GameManager script in unity.
UI Widget & Blueprint
A simple UI to couple with game functionality.
Score total is determined by amount of target objects there are in the game, and the timer counts down until 0.
The custom events here are what the GameMode BP calls on to update the score and time shown in the UI.
End Screen Widget & Blueprint
Depending on if the game was won or not, the end screen will change to display correct information
That’s all for now!
So with this basic setup, I plan to put this functionality into some environment design practice I’ve been doing to create a little walk/explore simulator.
More to come in the future…