Godot Version
4.3
Question
How to make wall jump in 3D
You can use is_on_wall_only()
to detect if a CharacterBody3D is touching a wall, then allow them to jump. To make them jump away from the wall you can use get_last_slide_collision().get_normal()
as a vector pointing away from the last collision (a wall).
if is_on_wall_only() and Input.is_action_just_pressed("Jump"):
var normal: Vector3 = get_last_slide_collision().get_normal()
velocity.y += JUMP_FORCE
velocity += normal * WALL_JUMP_FORCE