Challenge: For our 2.5D Cert Process, pick a character from Filebase in anticipation of putting in animations.

In order to setup animations, we first need a character! To do this, we will go to Filebase, go to the characters section, and select a character:

We will then create a game object child (“Model”) within our Player, delete the mesh renderer in our Player, and put the prefab model into our Model object. We will then update these to use the URP:

Challenge: Implement a Player Controller

To start, we want to create a new script (within our project folder for our 2.5D certification) and name it “Player”; we will drag this onto our player character and begin to setup our script:

Here, our controller is setup to get our character controller at the start, then use it to establish whether we are grounded, our horizontal movement, our jump ability, and our gravity. This results in:

Challenge: Implement a Player

For the GameDevHQ 2.5D Certification course, the first thing we want to do is setup a player. To do this, we first create a 3D object, snap it to our starting area (using “v”) and change the dimensions as needed:

Then, we remove the collider and add a character controller to our player object in order to start making our own controller script for our player:

Challenge: Implement our pressure pad into the game.

Now that we can move our box, we want to implement our pressure pad into the game so that our box can affect it. First, we will create a script for the pressure pad and attach it. Then, we will update our script:

Now, when our box gets within .05 of the pressure pad, it will stop and the pressure pad will change color:

Challenge: Implement a Box Puzzle in our game.

Currently, we have enacted our collectables system, our elevator, and our wall jump. The last hurdle we have to clear is our box puzzle:

We want to be able to push the box onto the yellow pad. To do this we modify the OnControllerColliderHit method within our player script by adding this:

Challenge: Implement Wall-Jumping.

Now that we have our elevator, we want to move on to our next section, which requires wall jumping. There are two things we want to do to set up; first we want to modify our player code to remove our ability to double jump:

and add in the following method to our player script:

Challenge: Implement our elevator movement upwards.

Currently, when we call the elevator, it moves from it’s top location to it’s bottom location. Now, we want it to move back up. We will start to implement this by first changing the box collider for our elevator panel to include the elevator:

The first thing we will do is modify our elevator panel script:

Challenge: Implement our elevator movement downwards.

Now that our elevator panel is set up, we want to create logic that governs moving the elevator down. Fundamentally, this is going to look like our platform movement script, using the movetowards function. First, we create an elevator script, attach it to our elevator, and modify our elevator panel script so:

Now, when our elevator panel script starts, it will find the elevator component. When the player calls the elevator, the callElevator method will run. This method will be accessed in our elevator script, which we will modify like so:

Challenge: Make our elevator require coins to operate.

Currently, our elevator light changes color to green when we get near it and press “E”. Before we update our script to actually move the elevator, we want to expand our requirements to include a coin limit. To start, we modify our elevator panel script to include a private int to cover our required coins (8, in this case), then modify our player script to include:

This will provide an int matching the number of coins that the player has. We can then utilize this number by modifying our elevator panel script:

Alec Oney

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store