fix body:set_gravity_scale & fix docs

This commit is contained in:
MihailRis
2025-09-22 23:52:50 +03:00
parent e61e8a6147
commit 8b38d57966
4 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ local prev_angle = (vec2.angle({dir[3], dir[1]})) % 360
function on_physics_update(delta)
local grounded = body:is_grounded()
body:set_vdamping(flight)
body:set_gravity_scale({0, flight and 0.0 or props.gravity_scale, 0})
body:set_gravity_scale(flight and 0.0 or props.gravity_scale)
body:set_linear_damping(
(flight or not grounded) and props.air_damping or props.ground_damping
)