- Home /
Box2D slopes sliding problem
Hey,
I'm trying to build my own controller using a 2D rigidbody but i'm stuck at how to handle slopes and the constant sliding down.
I'm porting my UE4 project to Unity and i didn't have this issue with UE4's character controller
So far i've seen a lot of suggestions but none of them seem to work properly or just feels too "hacky", i'm thinking the best way would be to cancel out the sliding by applying some velocity to my rigidbody to stabilize it, i can get the normal or the angle of the slope but i suck at maths so i don't know where to go from there, i'm sure there is a way to use the slope's angle to calculate the velocity needed to cancel out the sliding but as i said i'm terrible at maths.
Some help would be extremely appreciated!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612090640im_/https://answers.unity.com/themes/thub/images/avi.jpg)