Skip to content

Conversation

@felippeomgt
Copy link
Contributor

Adds two movement abilities to the character controller:

  • ClimbStepAbility3D — automatic step/stairs climbing
  • CrouchJumpBoostAbility3D — jump height boost when crouch and jump are performed in quick succession

ClimbStepAbility3D

  • Automatically detects and climbs steps/stairs up to a configurable height
  • Works in all horizontal directions (forward, backward, sideways)
  • Uses test_move() for reliable collision detection
  • Calculates required climb velocity based on step height
  • Maintains horizontal momentum during climbing
  • Configurable parameters:
    • step_size: Maximum step height that can be climbed (default: 0.5)
    • min_step_size: Minimum step height to trigger climbing, ignores very small steps (default: 0.25)
    • check_distance: Distance ahead to check for steps (default: 0.5)
    • climb_velocity_multiplier: Base velocity multiplier for climbing (default: 8.0)
    • max_climb_velocity: Maximum climb velocity to prevent excessive jumping (default: 15.0)

CrouchJumpBoostAbility3D

  • Increases jump height when crouch and jump are performed within a time window
  • Works in any order (crouch then jump, or jump then crouch)
  • Prevents cumulative boosts (one boost per jump)
  • Configurable parameters:
    • enabled: Toggle to enable/disable the ability (default: true)
    • jump_boost: Jump height multiplier when combo is detected (default: 1.5)
    • combo_window: Time window in seconds to perform both actions (default: 1.0)

Changes Made

  • Added abilities/climb_step_ability_3d.gd
  • Added abilities/crouch_jump_boost_ability_3d.gd
  • Updated core/character_controller_3d.gd to integrate both abilities
  • Updated core/controller.tscn to include the new ability nodes

May close #3.

@felippeomgt felippeomgt mentioned this pull request Jan 13, 2026
@scriptsengineer
Copy link
Member

Very good, tested and approved!
Thanks for the PR @felippeomgt

The only downside, although I don't think it prevents this PR, is that it had some strange behavior on terrain; it keeps trying to "climb stairs" on the terrain.
Maybe it's a configuration issue?

Video.sem.titulo.Feito.com.o.Clipchamp.mp4

@scriptsengineer scriptsengineer merged commit 76d7ee1 into expressobits:main Jan 14, 2026
scriptsengineer added a commit that referenced this pull request Jan 14, 2026
…-jump-abilities

Climb step and crouch+jump combo abilities
# Conflicts:
#	addons/character-controller/abilities/climb_step_ability_3d.gd
#	addons/character-controller/abilities/crouch_jump_boost_ability_3d.gd
@felippeomgt
Copy link
Contributor Author

@scriptsengineer Yeah, there are a couple config variables that you can tweak to get it to work more smoothly:

  • check_distance - will check the distance between the player and the obstacle to consider it a climbable step.
  • min_step_size - will ignore obstacles with less height than the value of that variable.

However, because terrain is so unpredictable, there's no silver bullet for this.
Even with these configs, there may still be inconsistencies depending on the terrain, which can sometimes make the system treat slopes as climbing steps, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Climb Ability

2 participants