How the code works:
To detect the collision, the Blueprint class would use the Event ActorBeginOverlap. The code checks to see if the other actor is the player (OtherActor == GetPlayerController). It uses a Branch function to check if the condition is true. If so, the game will display a game over screen widget (Create Game Over Widget), add it to the viewport (Add To Viewport), display the mouse course (Set ShowMouseCursor to false) and disable the input (Disable Input). We will also play a sound to confirm that the player has died, with Play Sound2D.
Blueprint Code (use right-click and drag):
Final laser:
What I have learnt:
From this mechanic, I have been able to produce a basic collision detection set up, which I could copy in other different mechanics in Unreal games. In comparison to Unity, this feels easier to access to check collisions to the player, as 'Get Player Controller' exists. This is a method which Unreal does not specifically have for the player.
I was happy with the outcome of this, because it felt simple to set up, and it gave me the result which I wanted.