Skip to main content
‹ Back to Tutorials
Intermediate Unity

Unity 3D Playmaker Creating Helix Jump - Set Up Game Over

Feb 2, 2022
About this tutorial

In this mini Unity 3D Playmaker tutorial series, we will be taking a look at creating Helix Jump. In this 4th tutorial of the series, I will show creating an enemy platform as well as how to set up game over. (to Join my discord server add a comment and I'll reply with the latest invite code) ► D

Written Guide

A Helix Jump clone needs a hazard the player must avoid and a clean game-over flow when they hit it. This fourth part of the series builds an enemy platform that stands out visually and physically, tags it for detection, and wires up Playmaker so colliding with it stops the ball and shows a Game Over screen.

Create the enemy platform material

Pick one of the existing bottom platforms (not the cylinder) to convert into a hazard. In your Materials folder, create a new material, set it to specular, and color it a bright yellow. Apply this material to the chosen platform and rename the material something clear like HJ Enemy so it reads as the danger platform.

Reshape the platform with ProBuilder

Real Helix Jump enemy platforms differ in shape as well as color. With the platform's edge selector active, select one outside edge and use ProBuilder's Insert Edge Loop to add a perpendicular loop of edges, subdividing the surface. Deselect, then select just that outer edge and nudge it outward slightly (temporarily unchecking ProGrid helps). This bump makes the enemy platform visibly distinct from the normal platforms.

Tag the enemy platform

Rename the game object Enemy Platform. Add a new tag called Enemy Platform and assign it to the platform so your collision logic can identify it. This tag is the hook the ball's FSM will check against.

Add the game-over collision in Ball Bounce

The ball already has a Ball Bounce FSM with a collision event for normal platforms (bounce) and a trigger for following the camera through a platform. Copy the existing collision event and add another that fires when the ball hits the Enemy Platform tag, sending a new Game Over event. Add the transition to a new state created with control-click, named Game Over.

Build the Game Over UI

Create a TextMesh Pro UI element reading GAME OVER. Set the Canvas to Screen Space - Overlay, and in the Canvas Scaler choose Scale With Screen Size with a mobile reference resolution of 640 x 1136, screen match mode set to Expand, and pixels per unit left at 100. Center the text on screen, widen its box to 400, and bump the font size to about 90. Add a UI Panel behind the text, color it to match the level, and raise the alpha for opacity. Name it UI Game Over and turn it off initially.

Activate the UI and stop the ball

In the Game Over state, drag the UI in and use Activate Game Object set to true so the inspector checkbox flips on. To stop the ball bouncing, add an Enable FSM action targeting the ball's Ball Bounce FSM with Enable unchecked. Because the player can hit the enemy from two states, copy the enemy-platform collision event into both Detect Ball Hit and Activate Camera Follow so each transitions to Game Over. Re-enable a removed platform to test: the ball bounces, falls through to the next level, and triggers Game Over on the enemy trigger.

Unity tools by Bliz Studio
Built for our own games — now on the Asset Store

Multi Tag — unlimited hierarchical tags for any GameObject. Hierarchy Pro — style your whole hierarchy with rules. Made by a Unity dev, for Unity devs.

Explore our Unity assets →