Remake Roller Splat with Unity 3D and Playmaker - Fixing Ball Still Moving After Level Complete
In this Unity and Playmaker tutorial series I'll recreate Roller Splat. PART 7 - Sometimes you introduce issues when trying something else and now need to fix the problems. Stopping the ball from moving after new level added. Absolutely NOCODE. Also check out How to Make a Bounce Game Series http
This short entry fixes a bug from the previous tutorial: after completing a level, the ball would sometimes keep moving into the next one. The fix isn't a patch — it's a structural change that puts movement control back where it belongs, using a Playmaker global transition.
The bug On level complete, the level manager was zeroing out the ball's movement by setting a Translate action to zero. It mostly worked, but not reliably — the ball would occasionally carry its momentum into the new level, continuing in whatever direction the player had last swiped.
Why zeroing the translate was the wrong approach The real problem is architectural. All ball movement lives in the movement FSM, but the level manager was reaching in and modifying movement directly. That means two FSMs are both trying to control the same thing, and whichever one runs last wins. Instead of fighting that, the fix is to let the movement FSM stop its own ball, and have the level manager simply ask it to.
Step 1 — Make Stop Ball a global transition The movement FSM already has a Stop Ball state. Right-click (or control-click) on the Stop Ball transition and choose Add Global Transition. Alongside the existing swipe up, down, and left transitions, Stop Ball is now global — meaning any other FSM in the project can send that event and jump this FSM straight into the Stop Ball state, regardless of what state it's currently sitting in. That last part is what makes this work: it doesn't matter whether the ball is mid-move or waiting for input.
Step 2 — Remove the old fix Go back to the level manager and delete the Translate action that was zeroing movement. It's no longer needed and leaving it in would mean two systems trying to do the same job.
Step 3 — Send the event from the level manager In the level complete state, add a Send Event By Name action. Move it to the top of the action list — stopping the ball should be the first thing that happens on level complete, before any of the other level-completion logic runs. Set the Event Target to Game Object FSM, then drag in the movement game object, since that's what holds the FSM containing the ball's movement and the global Stop Ball transition.
Step 4 — Get the event name exactly right Send Event By Name matches on a string, so a typo fails silently. The safe method is to copy the transition name from the movement FSM and paste it into the level manager's event field rather than retyping it. Enter stop ball as the event to send.
Step 5 — Test the specific case Testing this needs a little thought, because you can only observe the bug if the ball was actually moving when the level completed. Depending on which direction the level's walls allow, some final moves get blocked and the bug never manifests. Keep playing until you complete a level with a live movement in progress — in the video, an upward move on the previous level. On the new level, the ball sits still instead of continuing upward, confirming the stop event fires correctly.
The takeaway generalizes beyond this bug: when one system needs to change another system's state, sending an event to a global transition is cleaner and more reliable than reaching in and modifying the other system's variables directly.





