big
This commit is contained in:
@@ -23,6 +23,8 @@ func enter(_data: Dictionary = {}) -> void:
|
||||
|
||||
# Slide in the direction of current velocity (momentum-based)
|
||||
var hvel := Vector3(machine.player.velocity.x, 0.0, machine.player.velocity.z)
|
||||
if machine.player.has_method("update_slide_audio"):
|
||||
machine.player.update_slide_audio(hvel.length())
|
||||
if hvel.length_squared() > 0.01:
|
||||
_slide_direction = hvel.normalized()
|
||||
else:
|
||||
@@ -57,6 +59,8 @@ func update(delta: float) -> void:
|
||||
var vel: Vector3 = player.velocity
|
||||
var hvel := Vector3(vel.x, 0.0, vel.z)
|
||||
var hspeed := hvel.length()
|
||||
if player.has_method("update_slide_audio"):
|
||||
player.update_slide_audio(hspeed)
|
||||
|
||||
# ── Slope physics: gravity projected along the floor plane ────────────
|
||||
var on_slope := false
|
||||
|
||||
Reference in New Issue
Block a user