Edit of asset "Stairs Character" Accepted
Old/Current | New/Edit | |
---|---|---|
Title | Stairs Character | |
Description |
# Stairs Character A simple to use class that enables your CharacterBody3D to handle stairs properly. Mainly tested with the Jolt physics engine and cylinder colliders, not guaranteed to work well with anything else - but try it! ## Usage instructions: 1. Make your character controller extend `StairsCharacter` instead of `CharacterBody3D`. 2. Ensure your character's collider is named 'Collider'. 3. Every frame, set `desired_velocity` to the desired direction of movement. 4. Call `move_and_stair_step()` instead of calling `move_and_slide()`. 5. Done! ### Important: Ensure your character collider's margin value is set low - at most 0.01. Anything higher might cause snags. If you find that you're still snagging on ledges, lower it some more. |
A simple class you can extend to make your character support walking up stairs and other small steps. 1. Make your character controller extend StairsCharacter instead of CharacterBody3D. 2. Call handle_stairs() before calling move_and_slide(). 3. Done! If your controller uses multiple colliders, make sure the one closest to the ground is the first in the list. NOTE: Only works with capsule and cylinder colliders without script changes, as it uses the .height and .radius properties to place the stair stepping ray. The script should be fairly simple to change if you need to use a different kind of collider, however. |
Category | Scripts | |
License | MIT | |
Repository Provider | GitHub | |
Repository Url | https://github.com/Andicraft/stairs-character | |
Issues Url | https://github.com/Andicraft/stairs-character/issues | |
Godot version | Godot 4.0 | |
Version String | 1.1.1 | 1.0.2 |
Download Commit | 5403d02f6b64b49a1d1bd7af11dd51a6edfc9e6c | e2a5221fcdc572300c798863b1951f678de38423 |
Download Url (Computed) | https://github.com/Andicraft/stairs-character/archive/5403d02f6b64b49a1d1bd7af11dd51a6edfc9e6c.zip | https://github.com/Andicraft/stairs-character/archive/e2a5221fcdc572300c798863b1951f678de38423.zip |
Icon Url |
https://raw.githubusercontent.com/Andicraft/stairs-character/main/icon.png
|