Make A Character Climb A Ladder Up And Down In 2D Game Made With Unity Software @AlexanderZotov
Make A Character Climb A Ladder Up And Down In 2D Game Made With Unity Software  @AlexanderZotov
Uploaded July 2021 | Updated September 2026, 2 weeks ago
Hi! In this video I show you a simple way to make a character be able to climb a ladder.

I play games here - twitch.tv/zzotoff
You are very welcome :-)

Project Files Here drive.google.com/file/d/1wkJrj8t_wlAv1lZvYMmO-R97BE4lqHbw/view?usp=sharing

Let’s start from an empty project as usual and set it up step by step. First I add some ground to the scene. Make it a bit smaller and position it at the bottom. Ground will have a collider so my character will be able to walk on it. Edit it a bit. Next game object is a ladder. Make it smaller as well and put it about here. Ladder will have a collider which will be a trigger. I narrow it down so the character will climb a ladder only if he is in the middle of it. To detect a collision I add a rigid body to ladder and set it as kinematic one. Next I add a player to the scene. I make him to fit the ladder. Something like that. Also I set order in layer to 1 so player appears in front of the ladder. Player will have a circle collider that allows him to walk on the ground. Edit it a bit. Next component is a rigid body to detect collisions with the ground. I set gravity scale to 3 so player will fall faster. And I freeze Z rotation to prevent the player from rolling over. Player needs something to feel that the ladder is near. Right click on the player and create a new empty child. I rename it as Ladder detector. Put this detector on the players head. There we go. This detector needs a collider to detect a ladder. It will be a trigger. I edit it to make it a bit smaller. Good. Now it’s time to check out scripts that will control of of this stuff. First one is Ladder script. It’s just an empty one and it helps the detector to recognize a ladder. You can use a tag for that purpose but using a script is more versatile for me. Next script is Player script. This script helps me to move my player left and right and up and down if ladder is detected. Climbing Allowed property is responsible for that. This property will be changed by Ladder Detector when it meets a ladder. I switch rigid bodys kinematic option back and forth to prevent sliding effect. Player slowly goes down by the ladder if up or down button is released. And last script is Ladder Detector one. This script has an access to Player script. I can make this connection in the inspector due to serialize field attribute. So when detector meets a ladder the Climbing allowed property is set to true. When detector loses a ladder then climbing allowed is set to false. Pretty simple.
Ladder script goes to ladder. Player script goes to player. And Ladder Detector goes to detector. Last thing to do is to make that connection between detector and player by dropping the player into player slot of ladder detector script. Now I can hit play and see how it works. I can move my player left and right and climb the ladder up and down.
Make A Character Climb A Ladder Up And Down In 2D Game Made With Unity SoftwareLow Poly Knife Unity 3D Asset GiveawayHow To Open & Close 2D Door Pressing Or Clicking UI Button In Unity Software Game | Simple TutorialClick gameobject to make it big and small | Change scale with mouse click in Unity software gameCreate a simple combination lock puzzle game with Unity Software At Live StreamHow To Make 3D Coins Or Any Gameobject Rotate With Animation In Your Game Made With Unity SoftwareAdding Tooltip Or Hint Feature To Your 2D Game Made With Unity SoftwareBagel | How Do I Bake It With This Simple RecipeDestroy Game Object On Collision Instantiating Explosion Prefab | 2D Unity Software TutorialHow To Move Two Players At The Same Time And How To Create Two Separate Score Counters In Unity GameHow To Create Score Counter For 2D Unity Game | Pulsating Score Counter Effect With TextMesh ProBulls And Cows Android Puzzle Game Made With Unity And Published On Google Play Market
Alexander Zotov |

Make A Character Climb A Ladder Up And Down In 2D Game Made With Unity Software

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER