Quick answer: Godot has no built-in stair stepping. Place an invisible ramp collider over your visual stairs, or implement a step-up raycast in your _physics_process.
Here is how to fix Godot 4 CharacterBody3D characters that walk into stairs and refuse to climb. Godot does not include Unity-style Step Offset; you either model stairs as ramps under the hood or write the stepping logic yourself.
The Symptom
Character runs into a flight of stairs. Stops dead at the first step. Walking on flat ground works fine.
What Causes This
No built-in step support. CharacterBody3D treats steps as walls.
Slope angle too steep. An imaginary ramp through stair tops may exceed floor_max_angle.
Capsule shape catches lip. Even with a low slope, the capsule’s lower curve catches.
The Fix
Step 1: Add an invisible ramp collider over stairs. Create a StaticBody3D shaped as a ramp matching the stair slope. Disable the visual stairs’ collision (or set their CollisionShape3D disabled). The character glides up the ramp; players see steps.
Step 2: Or implement step-up logic.
extends CharacterBody3D
const MAX_STEP_HEIGHT := 0.4
func _physics_process(delta):
# normal movement first
move_and_slide()
# detect blocked horizontal motion
if get_slide_collision_count() > 0:
var col = get_slide_collision(0)
if col.get_normal().y < 0.5: # nearly vertical wall
try_step_up()
func try_step_up():
var origin = global_position + Vector3.UP * MAX_STEP_HEIGHT
var ahead = origin + transform.basis.z * 0.5
var ray = PhysicsRayQueryParameters3D.create(ahead, ahead - Vector3.UP * MAX_STEP_HEIGHT * 2)
var hit = get_world_3d().direct_space_state.intersect_ray(ray)
if hit:
global_position.y = hit.position.y + 0.01 # snap to step top
Step 3: Tune floor_max_angle.
floor_max_angle = deg_to_rad(50) # default 45
Higher allows steeper ramps but also makes walls walkable; balance carefully.
Step 4: Use capsule collision shape. Sphere-bottom capsule rolls over stair lips better than a box.
Step 5: For competitive games, prefer ramp colliders. Ramp approach is deterministic and frame-rate independent. Scripted stepping can produce micro-pops between physics steps.
“Ramp under stairs for visual + physics separation. Or step-up raycast for arbitrary geometry. Pick by complexity.”
Related Issues
For 2D ghost collisions, see CharacterBody2D Ghost. For 3D velocity Y, see Velocity Y Zeroed.
Hide a ramp under the stairs. Or raycast and snap. Climbing works.