How to handle slopes in a Unity 2d platformer game -

How to handle slopes in a Unity 2d platformer game

Sunny Valley Studio
Views: 13920
Like: 255
In this tutorial I will show you how to make sure that your dynamic rigidbody driven character can handle slopes in Unity 2D.

Do you want to improve the way you write code for your games on the example of a 2d platformer? Check my video course:

Is your character using kinematic rigidbody for movement? Maybe this tutorial will help:

You can support me through Patreon:

Join the discord:

0:00 Introduction
0:28 Slopes Tilemaps setup
2:06 Problem – Character is Sliding down
5:45 Problem – Character keeps jumping up
10:38 Want to learn more?


  1. Great video!

    My approach is to Raycast & check for a slope based on the angle(hit.normal.x) then switch my RigidBody to Kinematic or Static.
    But I got into trouble bc if there's no active collision you can't check for enemy bullets against the Player, and so…

    How would you solved that?

  2. Are the rigidbodies on the platforms supposed to be Dynamic or Kinematic? Also, whenever I set my character object's rigidbody2D to kinematic, it falls through the platforms…

  3. Thanks for this very nice explanation :') Are you planning to do a tutorial for different player states?

  4. Please add every new video to yours udemy course, like this one, mobile input with complete control. thank you

  5. I've had trouble with my character falling over on slopes so this is what i needed

Leave a Reply

Your email address will not be published.