Player character getting stuck on stairs

Godot Version

Godot 4.3

Question

`I’m currently trying to implement some stairs into my game, and my character keeps getting stuck. I have tried experimenting with the players max angle, and have had no luck. I have also included a screenshot of the collision shape, to show that the collision shape is a smooth ramp, with no visible snags.

Any help is greatly appreciated.`


Just don’t add colliders to reach individual step, and replace the stair colliders with angles planes . That should fix it

2 Likes

I have a ramp object that is basically what you described and it has the same issue. Is there another reason this could be happening

What’s your movement script look like in physics process?

If you look in the physics process where your movement script is, make sure to use I believe: move_and_slide, not move_and_collide… This is untested, but might be what you need unless you’re already using move_and_slide

It looks to me (I could be wrong?) like what’s happening is your “head” is hitting the upper stairs when you’re half way up the lower stairs.

The upper stairs and the lower stairs don’t overlap for this to be an issue. I originally had stairs that were a straight line and they still did this.

Hey, checked the player movement code, it’s move_and_slide

What if you make a simple CollisionShape3D with a BoxShape3D, rotate it 30 degrees so that it mimics more or less the shape of your stairs.

Is the problem still the same when you run up this smooth collider?

I’m suspecting maybe your collision shape for stairs has weird seams that your character gets stuck on. If you can run up a smooth box surface, but not your stairs, then that might be the case.

1 Like

This has fixed the issue, thanks!

Awesome!
Mark my response as a solution to the problem then, so others know it’s fixed in case they ever encountered the same problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.