
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?
13.05.2023
There is a better way to modify the shape of a collider (not to rely on the Vertex distance) -> https://youtu.be/eDOxDJEtE14
you are my new brackeys <3
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?
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…
Thanks for this very nice explanation :') Are you planning to do a tutorial for different player states?
Please add every new video to yours udemy course, like this one, mobile input with complete control. thank you
I've had trouble with my character falling over on slopes so this is what i needed
Thank you! This was very helpfull.
Wow this is worthless