Loading...
70
7 months 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 a relaxing autumn photoshoot I did tonight on my island. That AMAZING denim Bob jacket was designed by none other than our @KniteBlargh and is the perfect fit for a chilly fall night on Eilean! πŸ’œπŸ‚

SinatraGirl is streaming Animal Crossing: New Horizons again! Come hang out with her as she remodels her island entrance! GIVE HER SOME IDEAS!!!

I've been working on a new game dev project here lately and am actually REALLY happy with how this third person camera I made in Godot turned out! Do any of y'all have any suggestions for improvement on it before I move on to other gameplay elements?

Highrise Game Jam Reminder: In order to enter to win the Jam, your game must be created in Unity and submitted using the Highrise Studio Hub.

Learn all the deets about the jam at https://gamejolt.com/c/gamedev/highrisejam

new year, new me. Happy New Year y'all

πŸ₯³ The Highrise Game Jam is Underway! πŸ₯³

Watch the video for tips on getting started building your first world in Highrise Studio. (Creating and submitting within Highrise Studio Hub is the only way to enter the jam!)

Learn more: https://gamejolt.com/c/gamedev/highrisejam

I just came up with a game idea based on an idea I came up with for a small comic strip while I was sitting on the toilet here at work a little bit ago. πŸ‘€ Maybe that's what this project will turn itself into?! 😬 Here's my reminder note.

Looks like we're getting a live-action Legend of Zelda movie. πŸ‘€

https://www.nintendo.co.jp/corporate/release/en/2023/231108.html

πŸ₯³The Highrise Game Jam has begun! πŸ₯³

The Highrise Game Jam is where creators come together to craft immersive 3D worlds using Highrise Studio! There are cash prizes! πŸ’ΈπŸ’ΈπŸ’Έ

Learn the deets here: https://gamejolt.com/c/gamedev/highrisejam

Sometimes I have to remind myself to start small, go big later. 🀷 This is why I never make anything lol