Loading...
101
2 years ago

After researching different ways to handle stairs in Godot, I finally got it working last night! It's choppy and probably not the best implementation, but it will suffice for now and let me focus on other things! 😁


For anyone struggling with stairs in Godot, at least in 4.1.1, you can easily fix it by adding another CollisionShape3D to your CharacterBody3D node and use a SeparationRayShape3D as its shape. From there, move the new CollisionShape3D to the height of the step and set its length to the difference between it and the floor and rotate the CollisionShape3D to point it down towards the floor. Make sure if you have another collider on your CharacterBody3D that you move it or shrink it to be just above the new CollisionShape3D.

Basically, if you have a capsule for your player and the floor is -1 from the transform.origin of the player node, set your new CollisionShape3D to whatever the maximum height of your step will be above the floor and the length to that height as well.

It'll pretty much work instantly after that as the SeparationRayShape3D will push your CharacterBody3D up to the level of the step once it collides with it. It makes for a pretty simple way to handle stairs and you should be able to tweak it to how you need it.

I might make an actual tutorial video on how to do this as I have not found just a straightforward example of how this works. We have to share our knowledge so we can all grow and build the games we want to build.



2 comments

Loading...

Next up

Here's my coin purse. I'm slowly turning into the weird dude who pays in all gold dollars. 😬

It's been 6 years since the announcement teaser was released, and 13 years since Skyrim... come on, Bethesda! 😭

Given how Starfield turned out, though, I'm kinda worried about TESVI. 😬

After several hours of trying to explain how to count to 18, I have a working prototype of a game idea I've had courtesy of Gemini CLI. 😬 Depending on how the testing phase goes, I will be rewriting this myself into a more fleshed out game soon. 🤞

Card Corner is an idle poker game that sits in the corner of your screen while you do other things.

Deal cards, gain chips, buy score-multiplying buildings, complete achievements, and grow stronger across ascensions.

Play the demo: https://bit.ly/CardCornerSteam

Metroid Prime 4 Beyond trailer was officially revealed during the Nintendo Direct today! What do you think?

@ZAUM_SP 's ZERO PARADES: For Dead Spies is a mind-warping story of espionage and team-building in an original yet achingly familiar setting.

Play the Steam Next Fest demo now: https://bit.ly/ZeroParades

this project probably looks familiar, but it's likely the 4th rewrite since the last time I posted here... only this time I added a ball you can kick around, so I'm probably not going to make anymore progress as I'll be stuck kicking this ball around...

I think my third-person camera and player controller is done. 👀 Now I can finally move on to the next functionality to implement!

Akatori is an epic metroidvania where you wield your staff to fight, jump, and explore diverse realms across different eras.

It's also one of the games that's part of Steam Next Fest!

Play the Steam Next Fest demo now: https://bit.ly/Akatori

You can make around 1m or more gold by unaliving chickens in RuneScape north of Lumbridge and storing the loot in the bank chest just to the south. It's a no-brainer if you need gold fast, and pretty much anyone can do it from the very beginning.