调整角色移速
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user