How to Make a Skateboard Game with Unity and Playmaker - Part 3 - Making our Player Jump
In Part 3 of this Skateboard Game Tutorial, we will be looking at making our player jump We will use Unity and Playmaker, then also import character and animations from Mixamo and then also a few assets from Kenney.nl Part 1: Importing Mixamo Character and Set up: https://youtu.be/yFLheOEI6Pc Par
In Part 3 of the skateboard game series the player learns to jump. With horizontal movement already working, this part wires up the Animator so the character can switch between its skateboarding and jumping clips, then builds a Playmaker FSM that listens for the jump key, triggers the animation, launches the character upward, and resets cleanly so jumps cannot be spammed.
Prepare the animation clips
The jumping and skateboarding clips are embedded in their FBX models and cannot be used directly from the prefab, so duplicate each one with Command/Control-D to separate it out, then move both into your animation folder. These standalone clips are what the Animator controller will reference.
Set up the Animator transitions
In the skateboarder Animator, right-click the skateboarding state and Set As Layer Default State so it plays normally. Make a transition from skateboarding to jumping and another back from jumping to skateboarding. On both transitions turn off Has Exit Time so they switch immediately. Add a bool parameter named jump (left unchecked), and set the skateboarding-to-jumping transition's condition to jump being true. Finally, add an Animator component to the character and assign the skateboarder controller so the clips actually play.
Listen for the jump key
Alongside the existing FSMs (one moving the character forward, one handling left and right), add a third FSM named jump. Its first state, "listen for jump," uses a Get Key Down action watching the Space bar; on that key it fires a "character jump" event that transitions to a new jump state. At this point pressing Space moves you into the jump state even though nothing visible happens yet.
Trigger the jump and reset
In the jump state, add Set Animator Bool targeting the skateboarder, parameter jump, value true, so the jump animation plays. Then add Set Velocity on the owner (the player), setting only the Y axis with Every Frame unchecked so it fires once; 20 launches him too high, so dial it down to about 8. Next add a reset jump state that sets the jump bool back to false, then a wait state of roughly one to two seconds before returning to listen for the jump. That wait both lets the character return to the ground and prevents rapid re-jumping. He also notes nudging gravity up slightly to stop the character floating. The result: the player can move left and right and jump, even mid-air, smoothly.





