fix body:set_gravity_scale & fix docs
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user