调整角色移速

This commit is contained in:
2026-10-09 16:00:23 +08:00
parent 7de2090b6f
commit e06818bc5a
4 changed files with 67 additions and 8 deletions
+3 -2
View File
@@ -145,8 +145,9 @@ func _resolve_state(
velocity: Vector3, on_floor: bool, sprinting: bool, crouching: bool
) -> int:
if not on_floor:
# 上升用 jump、越过顶点用 fall。jump 片段长 0.5s,比「jump_velocity / 重力」
# 的上升时间略长,所以上升段不会播完 —— 越过顶点立刻切 fall,观感上是连贯的。
# 上升用 jump、越过顶点用 fall。jump 片段长 0.5s,而上升时间是
# jump_velocity / 有效重力(1.5 / 4.9 ≈ 0.31s),片段只播得完约六成 ——
# 越过顶点立刻切 fall,观感上是连贯的。
return AnimState.JUMP if velocity.y > 0.0 else AnimState.FALL
var moving := Vector2(velocity.x, velocity.z).length() >= idle_threshold
if crouching: