Bring the jump back so the key warp can reach high ledges

Space is bound to jump again, exactly as before: same action name, same physical_keycode 32, same jump_velocity -190 and gravity 980, so the measured jump height is 20.07 px, identical to the reading taken before the binding was removed. Single jump only, no double jump. The debug flight goes back to Space for up and S for down like it used to, with the arrow keys kept as an extra. No gameplay content touched.
This commit is contained in:
2026-10-07 23:14:52 +08:00
parent f549c03533
commit 4a6f4862de
4 changed files with 9 additions and 10 deletions
+4 -4
View File
@@ -369,10 +369,10 @@ func set_flying(on: bool) -> void:
func handle_fly_movement() -> void:
# 跳跃键已经停用了,所以调试飞行改用方向键上下(S 也保留作下降)来控制升降
var vertical := Input.get_axis("ui_up", "ui_down")
if is_zero_approx(vertical) and Input.is_action_pressed("squat"):
vertical = 1.0
# 和以前一样:空格(跳跃键)上升、S 下降。方向键上下也顺便能用
var vertical := Input.get_axis("jump", "squat")
if is_zero_approx(vertical):
vertical = Input.get_axis("ui_up", "ui_down")
var direction := Vector2(
Input.get_axis("move_left", "move_right"),
vertical