landing. don't bounce!
This commit is contained in:
@@ -1041,11 +1041,13 @@ func _physics_process(delta: float) -> void:
|
|||||||
velocity.z = flat_n.z * exit_spd
|
velocity.z = flat_n.z * exit_spd
|
||||||
pre_wall_vel = Vector3(velocity.x, 0.0, velocity.z)
|
pre_wall_vel = Vector3(velocity.x, 0.0, velocity.z)
|
||||||
|
|
||||||
# ── Bounce on landing ─────────────────────────────────────────────────────
|
# ── Landing. Don't bounce ─────────────────────────────────────────────────────
|
||||||
if is_on_floor() and not _was_on_floor:
|
if is_on_floor() and not _was_on_floor:
|
||||||
var impact := -_pre_slide_vel_y
|
velocity.y = 0.0
|
||||||
if impact > DP.f("bounce_min_impact") and not _slam_pending:
|
#Bouncing landing below
|
||||||
velocity.y = impact * DP.f("bounce_restitution")
|
#var impact := -_pre_slide_vel_y
|
||||||
|
#if impact > DP.f("bounce_min_impact") and not _slam_pending:
|
||||||
|
#velocity.y = impact * DP.f("bounce_restitution")
|
||||||
|
|
||||||
# ── Slam landing ──────────────────────────────────────────────────────────
|
# ── Slam landing ──────────────────────────────────────────────────────────
|
||||||
if _slam_pending and is_on_floor() and not _was_on_floor:
|
if _slam_pending and is_on_floor() and not _was_on_floor:
|
||||||
|
|||||||
Reference in New Issue
Block a user