Skip to main content
‹ Back to Tutorials
Intermediate Unity

Unity 3D Playmaker Creating Helix Jump - Camera Follow

Jan 30, 2022
About this tutorial

In this mini Unity 3D Playmaker tutorial series, we will be taking a look at creating Helix Jump. In this third tutorial of the series, I will show setting up the camera to follow the ball but only follow when the ball is passing through the platform layer. (to Join my discord server add a comment

Written Guide

In this third entry of the Helix Jump mini series, the goal is to make the camera follow the bouncing ball as it works its way down the tower, but only when the ball actually passes through a platform level rather than constantly bobbing with every little bounce. Before the camera work begins, the tutorial also fixes a physics quirk and swaps the background for a cleaner look.

Fixing the Double Bounce and Background

Where two platform pieces overlap at their seams, the ball can register a hit against both colliders at once, stacking their impulses and launching it too high. The fix is a small Wait added near the end of the bounce logic, set to 0.2, followed by a finished event that returns to the detect ball hit state. With that brief pause, the ball no longer double bounces at the joints. Next, select the main camera, switch its Environment clear flags from Skybox to Solid Color, and use a darker value of the scene's green. This makes the platforms pop and removes the distracting skybox.

Adding a Platform Trigger

The camera should only react when the ball drops past a platform, so each platform needs a trigger to detect that passage. Using ProBuilder, create a new pipe shape sized three by three, with a height of 0.1 and 12 sides to match the original platforms, and increase the thickness so it reliably catches the ball. Snap it just below the platform with ProGrid so it sits slightly inside and a touch smaller than the platform itself. Turn off the mesh renderer, name it platform trigger, enable Convex, and set Is Trigger to true. Create and assign a new tag called platform trigger. Finally, use Apply All on the prefab overrides so every platform inherits the trigger.

Making the Camera Follow the Ball

Select the ball and add a new FSM named camera follow, with its start state also called camera follow. Add a Get Position action targeting the ball, storing only the Y value into a new variable named ball y position, with Every Frame on. Then add a Set Position action that moves the camera's Y based on that variable, also Every Frame. Because the camera initially sits a little low, insert a Float Add between the two actions that adds 1 to the ball y position, nudging the camera up.

Activating Only While Falling Through

Left always on, the camera would bounce along with the ball, which is not the goal. So the camera follow behavior is turned off by default. In the bounce logic, after the wait, drag the camera follow FSM into the state and use Set Property on its enabled value set to false, disabling it. To switch it back on at the right moment, add a Trigger Event watching the ball; since the triggers are tagged platform trigger, it fires a new camera follow event when the ball drops through. That transition leads to an activate camera follow state, which uses Enable FSM on the owner's camera follow FSM. A copied Collision Event then watches for the ball striking a platform again, transitioning back to bounce ball where the follow is disabled once more. The result is a camera that stays static until the ball falls through a platform, glides down with it, and then settles, exactly the Helix Jump feel.

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 →