fix: correct axis direction, air accel, and jump/dash input handling

This commit is contained in:
2026-06-03 17:35:28 -04:00
parent 365264e819
commit dc2cb8ca26
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ func update(delta: float) -> void:
# Input direction
var input_v := machine.input_dir
var wish_dir := Vector3(input_v.x, 0.0, -input_v.y)
var wish_dir := Vector3(input_v.x, 0.0, input_v.y)
if wish_dir.length_squared() > 1.0:
wish_dir = wish_dir.normalized()
@@ -31,7 +31,7 @@ func update(delta: float) -> void:
var hvel := Vector3(vel.x, 0.0, vel.z)
var target_vel := wish_dir * effective_speed * params.air_control
hvel = hvel.lerp(Vector3(hvel.x + target_vel.x, 0.0, hvel.z + target_vel.z), 1.0 - exp(-params.air_acceleration * delta))
hvel = hvel.lerp(target_vel, 1.0 - exp(-params.air_acceleration * delta))
vel.x = hvel.x
vel.z = hvel.z
+1 -1
View File
@@ -19,7 +19,7 @@ func update(delta: float) -> void:
# Input direction
var input_v := machine.input_dir
var wish_dir := Vector3(input_v.x, 0.0, -input_v.y)
var wish_dir := Vector3(input_v.x, 0.0, input_v.y)
if wish_dir.length_squared() > 1.0:
wish_dir = wish_dir.normalized()