Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

StairsSteppingBody3D

An asset by vissa
The page banner background of a mountain and forest
StairsSteppingBody3D hero image

Quick Information

0 ratings
StairsSteppingBody3D icon image
vissa
StairsSteppingBody3D

Extension for CharacterBody3D that is able to go up and down the stairs.

Supported Engine Version
4.3
Version String
1.0.2
License Version
MIT
Support Level
community
Modified Date
7 months ago
Git URL
Issue URL

StairsSteppingBody3D

CharacterBody3D that automatically controlls movement up and down the stairs

How to use

  • Set PLAYER_COLLIDER to whichever collider you want your body to use.
  • Set velocity every physical frame to whatever value you wish to move;
  • Don't forget to call super(delta) at the start of _physics_process if you are overriding it.

Credits

Most of the code in this addon has been forked from other projects. Check out full list for more:

Notes:

  1. All shape colliders are supported. But Capsule colliders are recommended for enemies due to its compatibility with the Navigation Meshes. Its up to you what shape you want to use for players.

  2. To adjust the step-up/down height, just change the MAX_STEP_UP/MAX_STEP_DOWN.

  3. This uses Jolt Physics as the default Godot Physics has a few bugs:

    • Small gaps that you should be able to fit through both ways will block you in Godot Physics. You can see this demonstrated with the floating boxes in front of the big stairs.
    • Walking into some objects may push the player downward by a small amount which causes jittering and causes the floor to be detected as a step.

TLDR: This still works with default Godot Physics, although it feels a lot better in Jolt Physics.

Extension for CharacterBody3D that is able to go up and down the stairs.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
StairsSteppingBody3D icon image
vissa
StairsSteppingBody3D

Extension for CharacterBody3D that is able to go up and down the stairs.

Supported Engine Version
4.3
Version String
1.0.2
License Version
MIT
Support Level
community
Modified Date
7 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers