2.5D Platformer — #11 Climbing Ledge

Climbing the ledge demonstration

In the last article, we gave the character the ability to grab onto a ledge after jumping across. In this article, we will give the character the ability to climb onto the ledge.

Import a Climbing a Ledge Animation

Firstly we will head over to the Mixamo website, find and download the animation we require for this ability.

Drag the downloaded FBX file into Unity and extract the animation file (see the previous article on how to do this).

Configure the animation

Drag on the Climbing animation into the Character Animator Controller. Create a Trigger and wire it up to the Transition from the Hanging to Climb.

For this animation, Bake Into Pose for Root Transform settings.

With the animation and the parameter setup, lets call this trigger and it makes sense when the character is hanging to press W to climb up.

If we are to press Play and make the character climb, it does what it is suppose to do but the character ends up at the bottom.

The reason this occurs is the animations moves the “skin” of the character to the top of the ledge but the character controller still remains at where the character was hanging. Click on the character in the scene view to see where the Character Controller remains.

We need to move the Character Controller to where we want to Idle animations to occur after the climb has completed and how can we do this?

Lucky for us, animations can execute scripts at certain stages of the animation. In this case, we will create a script that executes when the exits the Climb animation.

Create a ClimbUpBehaviour script

Create the script.

ClimbUpAnimation script

In the Player script, we have a public method that positions the Character Controller in the standing position supplied by theLedge script.

Player script
Ledge script

That is all we need to do now to make the character appear on the platform.

Climbing the ledge demonstration

If you enjoyed reading this article give me a Clap, also if you would like to see more, “Follow” me, so you may be notified of future releases. You may also send me a message if you need any further help.

I am available for your next chart-topping game!

--

--

--

A Data & Analytics Consultant who is expanding into developing experiences in XR, Enterprise and Gaming space using Unity www.jeannoelseneque.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hunting for Data: a Few Words on Data Scraping

The #Thinkium Foundation is launching developer Bounty Program to help and encourage community…

Defi Yield Farming on VIGOR Protocol

What is the AWS CLI?

The Complete Roadmap for C Programming with Covered all topics Basics to Advanced…

Time-based table partitioning using pg partman

A CoinMarketCap Web Alternative

“Who” did “What” “When” and From “Where” on Compute Instance on OCI

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
Jean-Noel Seneque

Jean-Noel Seneque

A Data & Analytics Consultant who is expanding into developing experiences in XR, Enterprise and Gaming space using Unity www.jeannoelseneque.com

More from Medium

VR Development — Day #3

Creating Rewarded Video Ads in Unity

Indy Pro ’22: Talent Training

My journey becoming a Unity game developer: 2.5D Infinite Runner-Ledge Grab System-Pt2