Tuesday 31.5 | Climbing

Platformer Prototype

A bit of polishing on the roll and climbing system's code being today's main focus. Telling a little about the system and why I decided to do this kind of climbing system.

Climbing System

Fast Research & Design

The quest for climbing started with researching the ways people have made climbing mechanics in unity. Before though, I set some boundaries such as it must have very little need for animations and that the implementation has to be easy for my kinematic character controller.

Minimizing Animation Amount

I thought about how I could minimize the need for animations and thought of making the player leap across the wall. This would result in not needing to blend and sync 4 climbing animations just for the movement which might've ended being boring after all. When the player is not leaping the character slowly slips down the surface eventually falling to the ground, adding a small mechanic in avoiding falling down.


Easy Development

I found some amazing climbing tech demos, but these were not what I was looking for because of the complexity. Then after a little bit of browsing I came across a familiar site, Catlike Coding. There I found out I should just shift the gravity and project the movement input based on the wall normal, so I did. The leap and slip method helps fast development a lot too because there's no procedural animations. Now next is probably the hardest part that is the ledge detecting, grabbing and all the animation blending that come with them.

ClimberEditor GravityShiftingCode

Today's work

  • Platformer
    • Roll made a little longer
    • Climbing code
      • Detects wall at certain height and proximity
      • Player rotates to face wall normal
      • Gravity shifts to wall normal
      • "Climbable" physics layer
      • Movement input relative to wall normal
      • Leaps to direction of input
      • Slips constantly and slides off after certain time