0:55 - Setting up the test level scene
2:17 - Setting up the player physics2D object
4:15 - Setting up the player controller script
6:22 - Creating the Move function
7:50 - Explanation of the Input Manager
10:04 - Demonstration of player movement
10:36 - Creating the Jump function
12:39 - Demonstration of Jump function
13:21 - Adding the isGrounded check
16:57 - Demonstration of isGrounded and why we need a LayerMask
17:28 - Adding the LayerMask
18:18 - Setting up the Player layer for our mask
19:05 - Outro, what we will cover in Part 2

In this video, part 2 of our 4.6 Platformer series, we add on-screen touch input buttons for mobile and move our player with those but calling the functions we wrote in part 1. We also add slick edges to our platforms so we don't stick to them if we move towards them while in the air.

Time Breakdown:

0:50 - Explaining different possible jump behaviours
1:38 - Adding the option to disable new movement while in air
2:50 - Demonstration of the new jump behaviour
3:20 - Adding a slick PhysicsMaterial2D to the platform
5:05 - Only adding the slick material to the edges of the platform
7:07 - Creating touch buttons
8:09 - #Ifdef disable keyboard controls for mobile
9:32 - Adding Event trigger events to our touch button
10:55 - Explaination of new move function we need
11:24 - Writing the StartMoving function
13:47 - Adding the Jump button
15:37 - Destroying the touch buttons if not on mobile
17:44 - Setting up build settings to run on Android
19:06 - Scale touch buttons using Canvas Scaler
19:51 - Demonstration of touch buttons on Android build
20:26 - What will we do in part 3? Animate the character

Support Further Tutorial Development

Comments?

Check out the videos above to hear the explanation and see the code in action