Why 2d move_and_slide on slope stops on corner?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By anssiko


I’m having a lot of issues woth polygon corners and 2d move_and_slide:

  1. Sliding movement completely stops when it encounters a corner on a downwards slope, unless it has a lot of velocity. What creates a treshold for velocity to continue over a slope corner?
  2. Sometimes the player gets permanently stuck on the corner, with false on is_on_floor and my raycast that detects ground (even though atleast raycast should clearly return true).

I’m using:

  • kinematicbody2d
  • capsule shape collision
  • move_and_slide

Are there known bugs related to this?
Is move_and_slide somehow problematic with corners?
Is it generally a mistake to create 2d platformer with polygon shapes and slopes?

Thanks for any input and ideas!

:bust_in_silhouette: Reply From: asgerregsa

Did you find out what’s causing it? I’m having the same issue. I use moveandslide too and when I let the player bounce by holding a special key upon collision, it sometimes results in unexpected behavior.